diff --git a/index.ts b/index.ts index 56b28e0..2fc5fac 100644 --- a/index.ts +++ b/index.ts @@ -8,6 +8,8 @@ require("dotenv").config(); const sernPrefix = process.env.PREFIX const mongoose = require('mongoose'); const youtube = require('discord-bot-youtube-notifications'); +import express from 'express' +const app = express(); const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMembers, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildMessageReactions, GatewayIntentBits.GuildVoiceStates], @@ -44,6 +46,15 @@ client.on('rateLimit', async () => { console.log(`I just got ratelimited!`) }) +app.use(express.static("public")) + +app.get("/", function (req, res) { + res.send("
This is the monitoring server for the Vinci discord bot!
If you see this, the bot is up and running.
") +}) + +app.listen(process.env.PORT || 7272, + () => console.log("The webserver is listening on port " + process.env.PORT || 3000)); + /*async function nowPlayingRadio() { const getAPI = await axios.get("https://opml.radiotime.com/Describe.ashx?id=s67006", {validateStatus: function (status) {return status === 200|| status === 403}}).then((res) => res.data).catch((err) => {console.log("now playing radio errored out? diesofcringe")}) var parser = new DOMParser() diff --git a/start.sh b/start.sh index c426b23..e895e4c 100644 --- a/start.sh +++ b/start.sh @@ -1,9 +1,3 @@ #!/bin/bash -set -m - -node webserver.js & - -ts-node --transpile-only index.ts - -fg %1 \ No newline at end of file +ts-node --transpile-only index.ts \ No newline at end of file