A large part of this was possible because of wleroux on discord.
This is a Discord bot that uses the SST Framework
Check apps/discord
for the code.
Copy .env-example
to .env.local
.
Get your discord bot token, app id, and public key from here and paste it in .env.local
.
Run pnpm install
to install dependencies.
Run pnpm dev
to start the bot.
You need to copy ${DiscordEndpoint}/interactions
to your discord app's interaction endpoint.
Deploy with Seed. Set the env vars accordingly. The app registers the commands automatically on startup.
Add commands in apps/discord/src/commands
. index.ts
in that folder exports all the commands and handlers.