Files
discordeno/examples/reaction-roles
Fleny 27c261fee2 formatter: Use semicolons (#4686)
I prefer semicolors, they also help avoiding certain pitfalls in JavaScript/TypeScript, such as the following code sample:
```js
const xyz = "test"
(something.else as string) = "another"
```
This results in a TypeError: "test" is not a function, this is because js thinks we are trying to call the string "test" as a function.
To fix this it requires a `;` somewhere before the `(`, such as `;(something ... ` which in my opinion is ugly and less clean overall.
2026-01-17 21:54:15 +01:00
..
2026-01-17 21:54:15 +01:00

Reaction roles example bot

Example bot for reaction-roles using Discord Interactions and not classic reactions.

Setup

  1. Rename .env.example to .env and add your bot token in the TOKEN variable
  2. Replace REPLACE WITH YOUR GUILD ID in src/register-commands.ts with your test guild id

Run the bot

  1. yarn to install the dependencies
  2. yarn postinstall to run the Discordeno Desired Properties CLI
  3. yarn build to build the .ts files into .js
  4. yarn start (or node ./dist/index.js) to run the bot