Skip to main content
Deno 2 is finally here 🎉️
Learn more

discord_app

deno doc

Define and serve Discord application commands.

Application commands are native ways to interact with apps in the Discord client. There are 3 types of commands accessible in different interfaces: the chat input, a message’s context menu (top-right menu or right-clicking in a message), and a user’s context menu (right-clicking on a user).

Usage

Note

The discord_app library is currently only known to be available in Deno.

Examples

Message commands

In discord_app, message commands are created and served as demonstrated in /examples/bookmark.ts.

User commands

In discord_app, user commands are created and served as demonstrated in /examples/high_five.ts.

Chat input commands

For those developers looking to make more organized and complex groups of commands, look no further than subcommands and groups.

Subcommands organize your commands by specifying actions within a command or group.

Subcommand Groups organize your subcommands by grouping subcommands by similar action or resource within a command.

These are not enforced rules. You are free to use subcommands and groups however you’d like; it’s just how we think about them.

In discord_app, chat input commands, also known as “slash commands”, are created and served as demonstrated in the following example files:

Contributing

Contributions to the project are welcome. Feel free to open an issue or pull request!


Developed with 💜 by @EthanThatOneKid