import http from "http"; import express from "express"; import { ExtendedClient } from "../interface/ExtendedClient"; /** * Instantiates the web server for listening to webhook payloads. * * TODO: Delete this entirely once all trello things are done. * * @param {ExtendedClient} bot The bot's Discord instance. */ export const serve = async (bot: ExtendedClient) => { const app = express(); app.use(express.json()); app.get("/", (_req, res) => { res.header("Content-Type", "text/html"); res.status(200).send(` Art 4 Palestine Bot

Art 4 Palestine Bot

A bot to facilitate our initiative to raise funds for Palestine relief charities by rewarding donors with art.

Links

Source Code

Documentation

Support

`); }); const httpServer = http.createServer(app); httpServer.listen(10080, async () => { await bot.debug.send("http server listening on port 10080"); }); };