You will need a discord bot account for testing your code. We will provide one for the duration of this workshop.
Create a .env file in the root of your project, and initialize it with the following information:
DISCORD_TOKEN=<BOT_TOKEN>
OSAI_GUILD=<ID of your discord server>
APP_ID=<Client ID of your bot>
- Create a file the src/commands/ directory
- Label it <command_title>.ts
- If you're new to discord.js, copy over the code from one of the existing command files into your new file. ping.ts is a good place to start.
- Change the code to your specifications.
- Run
npm run start-full
to test and run your command! - Add comments, name variables properly and write a descriptive commit message.
To check for typing and other syntax issues, run npm run lint