MonkeDev / discord-webhook

A module to create/edit/delete webhook messages on Discord using their API | First TypeScript & Deno project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

A module to create/edit/delete webhook messages on Discord using their API | First TypeScript & Deno project

License:MIT License


Languages

Language:TypeScript 100.0%