Skip to content

Instantly share code, notes, and snippets.

View whirlxd's full-sized avatar
:shipit:
website out

Whirl whirlxd

:shipit:
website out
View GitHub Profile
@whirlxd
whirlxd / main.js
Created October 2, 2021 16:49
Webhook Sender API
/*Code for a webhook api
Example usage:*/
// http://localhost:3000/webhook?url=https://canary.discord.com/api/webhooks/hook-id/hook-token&message=xdd&username=yoo```
js
const express = require("express");
const app = express();
const { WebhookClient: hook } = require("discord.js"); //webhook client sounds shit so i renamed it to hook!
app.get("/webhook", async (req, res) => {
//destructred query params
const { url, message, avatarUrl, username } = req.query;