GithubHelp home page GithubHelp logo

johncmanuel / dndbot Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 24 KB

Discord helper bot to help with future DnD sessions on Discord

Home Page: https://dndbot.deno.dev/invite

License: MIT License

TypeScript 100.00%
deno dice-roller discord dnd

dndbot's Introduction

DnD Discord Bot

Discord helper bot to help with future DnD sessions on Discord

TODO

  1. Make commands for most commonly used dice rolls (i.e checks, saving throws, attack rolls, etc)
  2. Refactor duplicate code
  3. Work on processing multiple, comma-separated dice expressions (i.e 3d8+2, 1d20+1, etc.)
  4. Create an auto-updating GitHub wiki page for all slash commands using a GitHub action and Discord API

Setup

  1. Install Devbox
  2. Setup your Discord application
  3. Setup environment variables in a .env file
DISCORD_APPLICATION_ID=""
DISCORD_PUBLIC_KEY=""
DISCORD_TOKEN=""
  1. Create an account at ngrok, which will be used to expose the local development server to Discord
  2. Use deno task ngrok and deno task start in two separate terminals; one will be for ngrok and another for the server respectively
  3. Use the URL given in the ngrok terminal under Forwarding that points to localhost as the Interactions Endpoint URL in your Discord application (change the URL with your production URL when switching to production)
  4. Invite the bot to your server at the /invite endpoint and you're done :)

Commands

/dnd dice roll

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"

Credits

  1. Ethan for making a goated Deno library: discord_app

dndbot's People

Contributors

johncmanuel avatar

Stargazers

Ethan Davidson avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.