Skillz4Killz 19f228c329 feat: slash commands and interactions (#248)
* start slash commands

* lil bit of this

* a little bit of that

* chore: add slash commands' types  (#249)

* Add slash Types

* style: format source files

* interaction create event

* make it a valid controller

* respond to a slash command

* interactions

* shtuff

* gotta get them all

* you gotta hit the bullseye

* you gotta survive

* most important thing i forgot

* please keep this

* more shuttttfgvuasdafwesdvjzdk

* more endpoints

* TYPO

* making that party jam

* this is my jam

* refactor: move slash commands types to webhook.ts (#250)

* Move Types

* Move to webhook.ts types file

* Update webhook.ts

* fix: update ExecuteSlashCommandOptions (#252)

* Move Types

* idk

* Remove Unnecessary Comment

* details

* http side of slash

* Format

* idk

* cleanup

* fmt

* fix imports

* tet

* remove log

* Update interactions.ts

* Update interactions.ts

* Update interactions.ts

* Use tweetnacl_deno for verification

* chore: move tweetnacl import to deps.ts

* Update deps.ts

* deps: use tweetnacl from GitHub

* fix: use serverOptions.slashHexKey

* fix: res -> req

* fix: use TextEncoder

* deps: add std@0.81.0/encoding/hex.ts

* chore: use encode() from std/encoding/hex.ts

* I am using the GitHub online editor pls help

* Update deps.ts

* Update interactions.ts

* Update interactions.ts

* Update interactions.ts

* Update interactions.ts

* fix: respond with 400 if timestamp and signature not present

* style: format files

* refactor!: merge createServer() into startServer()

* style: format files

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>
Co-authored-by: ayntee <ayyantee@gmail.com>
2020-12-22 21:39:01 +04:00
2020-12-07 14:24:47 +00:00
2020-11-17 23:43:04 -05:00
2020-12-15 14:52:24 +04:00

Discordeno

Discord API library for Deno

Discord Lint Test

  • First-class TypeScript & JavaScript support
  • Secure & stable
  • Builtin Documentation
  • Minimalistic
  • Function-based API

Beginner Developers

Don't worry a lot of developers start out coding their first projects as a Discord bot (I did 😉) and it is not so easy to do so. Discordeno is built considering all the issues with pre-existing libraries and issues that I had when I first started out coding bots. If you are a beginner developer, you may check out these awesome official and unofficial boilerplates:

If you do not wish to use a boilerplate, you may continue reading.

Advanced Developers

Here's a minimal example to get started with:

import startBot, { sendMessage, Intents } from "https://deno.land/x/discordeno@9.4.0/mod.ts";

startBot({
  token: "BOT TOKEN",
  intents: [Intents.GUILD_MESSAGES, Intents.GUILDS],
  eventHandlers: {
    ready: () => console.log('Successfully connected to gateway'),
    messageCreate: (message) => {
      if (message.content === "hello") {
        sendMessage(message.channelID, "Hi there!");
      }
    },
  },
});

Contributing

We appreciate your help!

Before contributing, please read the Contributing Guide.

License

MIT © discordeno

Languages
TypeScript 98%
MDX 0.7%
CSS 0.6%
JavaScript 0.6%
Dockerfile 0.1%