Discord helper bot to help with future DnD sessions on Discord
- Make commands for most commonly used dice rolls (i.e checks, saving throws, attack rolls, etc)
- Refactor duplicate code
- Work on processing multiple, comma-separated dice expressions (i.e 3d8+2, 1d20+1, etc.)
- Create an auto-updating GitHub wiki page for all slash commands using a GitHub action and Discord API
- Install Devbox
- Setup your Discord application
- Setup environment variables in a
.envfile
DISCORD_APPLICATION_ID=""
DISCORD_PUBLIC_KEY=""
DISCORD_TOKEN=""
- Create an account at ngrok, which will be used to expose the local development server to Discord
- Use
deno task ngrokanddeno task startin two separate terminals; one will be for ngrok and another for the server respectively - Use the URL given in the
ngrokterminal underForwardingthat points to localhost as theInteractions Endpoint URLin your Discord application (change the URL with your production URL when switching to production) - Invite the bot to your server at the
/inviteendpoint and you're done :)
Arguments: (dice-expression) (advantage-or-disadvantage) (comment)
Example usage:
# The bot uses Discord's built-in slash commands
/dnd dice roll 3d8
/dnd dice roll 1d20+8 advantage
/dnd dice roll 8d4+4 disadvantage
/dnd dice roll 1d20 "wisdom check"
/dnd dice roll 1d20+2 advantage "arcana check on deciphering writing in ancient spellbook"
- Ethan for making a goated Deno library: discord_app