DiceBot

My own version of a simple dice rolling bot!

GitHub

My commands are as follows:


/help - shows this help command
/roll <notation> - Rolls based on the given notation!

Defined notation
$DROLL - Rolls 1d20
$DADV - Rolls 2d20\'s and keeps the highest
$DDIS - Rolls 2d20\'s and keeps the lowest
$CROLL - Rolls 1d100
$CADV - Rolls 2d100\'s and keeps the lowest
$CDIS - Rolls 2d100\'s and keeps the highest

More information regarding avaiable notation: https://greenimp.github.io/rpg-dice-roller/guide/notation/


How to install

  1. Clone or download the git repo
    $ git clone [email protected]:SamKemp/DiscordBot-DiceBot.git
  2. Rename config.example.json to config.json
  3. Open the Discord developer portal and log into your account.
  4. Click on the "New Application" button.
  5. Enter a name and confirm the pop-up window but clicking the "Create" button.
    Here you can edit the applications name, description or avatar
    Most importantly you can copy the Application ID (sometimes referred to as the Client ID), which we'll need in step's 8 and 9
  6. Select the "Bot" tab on the left hand side. Click the "Add Bot" button on the right and confirm the pop-up window by clicking "Yes, do it!".
  7. In this panel, you can give your bot a snazzy avatar and set its username. Most importantly you can copy the Bot Token, which we'll need in step 8
  8. Enter Bot Token, Client ID and Guild ID, as well as any other required info into the config.json
  9. Invite your bot to the desired server
    https://discord.com/api/oauth2/authorize?client_id=123456789012345678&permissions=0&scope=bot%20applications.commands
  10. Ensure you have at least Node v16.6.0 installed and run npm install
  11. Finally running node index.js will start the bot