## Creating a Discord bot with Bun Discord bots perform actions in response to _application commands_. 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). To get started you can use the interactions template: ```bash bun create discord-interactions my-interactions-bot cd my-interactions-bot ``` If you don't have a Discord bot/application yet, you can create one [here (https://discord.com/developers/applications/me)](https://discord.com/developers/applications/me). Invite bot to your server by visiting `https://discord.com/api/oauth2/authorize?client_id=&scope=bot%20applications.commands` Afterwards you will need to get your bot's token, public key, and application id from the application page and put them into `.env.example` file Then you can run the http server that will handle your interactions: ```bash $ bun install $ mv .env.example .env $ bun run.js # listening on port 1337 ``` Discord does not accept an insecure HTTP server, so you will need to provide an SSL certificate or put the interactions server behind a secure reverse proxy. For development, you can use ngrok/cloudflare tunnel to expose local ports as secure URL. -lock'>ciro/fetch-fix-with-lock Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/integration/snippets/caught-require.js (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2022-02-04Update types.zigGravatar Jarred Sumner 1-9/+10
2022-02-04Update test_command.zigGravatar Jarred Sumner 1-2/+0
2022-02-04`path.normalize()` tests passGravatar Jarred Sumner 2-146/+213
2022-02-03Fix test failures in path.joinGravatar Jarred Sumner 1-8/+115
2022-02-03Update mimalloc_arena.zigGravatar Jarred Sumner 1-0/+9
2022-02-03[bun test] Support multiple filesGravatar Jarred Sumner 1-2/+12
2022-02-03Update js_ast.zigGravatar Jarred Sumner 1-0/+1
2022-02-03Support loading multiple entry points by changing what `bun:main` points toGravatar Jarred Sumner 6-4/+36
2022-02-03[bun install] Configurable max http retry countGravatar Jarred Sumner 1-0/+7
2022-02-03Missing newline in errors in bun installGravatar Jarred Sumner 1-4/+8
2022-02-03Fix bug with http clientGravatar Jarred Sumner 6-107/+101
2022-02-03Move detectFastRefresh to later so HTTP request handler starts fasterGravatar Jarred Sumner 1-2/+1
2022-02-03Fix bug with macro remaps in Bun.Transpiler apiGravatar Jarred Sumner 2-5/+8
2022-02-03Slight improvement to non-ascii file path handlingGravatar Jarred Sumner 4-18/+79
2022-02-02`path.relative` passes Node's tests (which also fixed bugs)Gravatar Jarred Sumner 8-283/+571