mirror of
https://github.com/discordeno/discordeno.git
synced 2026-05-21 02:40:08 +00:00
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.
Minimal Bot Template
Just the minimum to get a working bot using interactions.
This template does not include any caching or other features you might need. This template also includes a /ping command to show the bot latency
Setup
- Download the source
- Install the dependencies using
yarn - Copy the .env.example file and rename it to .env
- Fill out the .env file
Run Bot
- run
yarnto install the dependencies - run
yarn buildto build the source - run
node dist/register-commands.jsto register the slash commands - run
yarn startto run the bot