0
Send a message to discord using webhook
One script reply has been approved by the moderators Verified
Created by lplit 876 days ago Viewed 27958 times
0
Submitted by lplit Deno
Verified 876 days ago
1
import discordwebhook from "https://deno.land/x/discordwebhook/mod.ts";
2

3
type DiscordWebhook = {
4
  webhook_url: string;
5
};
6
export async function main(discord_webhook: DiscordWebhook, message: string) {
7
  const webhook = new discordwebhook(discord_webhook.webhook_url);
8
  const ret = await webhook.createMessage(message);
9
  return ret;
10
}
11