discord-webhook

  • Create/Edit/Delete Discord webhook messages with their API.
  • Read our Documentation if you are confused on how to use this package and/or get help in our Discord Server

Example using Discordeno

import discordwebhook from "https://deno.land/x/discordwebhook/mod.ts";
import { startBot } from "https://deno.land/x/discordeno/mod.ts";
const webhook = new discordwebhook("YOUR-WEBHOOK-URL");

startBot({
  token: "BOT-TOKEN",
  intents: ["GUILDS", "GUILD_MESSAGES"],
  eventHandlers: {
    ready() {
      console.log("Successfully connected to gateway");
    },
    messageCreate(message) {
      if (message.content == "hi") {
        webhook.createMessage("Hello!")
          .then(console.log);
      }
    },
  },
});

Contributing

You may check out the Discord Webhook Documentation to see what new methods/functionality should be added. Please contact the founders on the Discord Server for more information. Once you got the idea, fork the repository. Upon completion, format your code with deno fmt and make a pull request.