- Clone the repo
- In a terminal in the project directory, run
npm run init
- Create a file in the project root directory called
.env
- Copy everything in
.env.template
and put it in.env
, filling in the missing values - Write some code and run
node .
to start the bot
- Run
npx supabase login
- Put in your login stuff
- Run
npx supabase projects list
- Find the correct project and copy the ID
- Run
npx supabase gen types typescript --project-id <ID> > ./src/types/database.ts
For updating slash commands, the npm scripts cmdsDev
and cmdsProd
have been conveniently created for this very purpose. Simply run npm run cmdsDev
or npm run cmdsProd
to update the guild and global slash commands respectively
To delete all slash commands in the guild, or globally, run the deleteCommands.js
file with ENV=dev
or ENV=prod
before the node command.
Guild slash commands update instantly in one guild, while global slash commands take a while, but update everywhere. Probably use guild slash commands for everything.