GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Moriko1/sidekick: dicebot

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

4 Commits
4 Commits

Folders and files

NameName
Last commit message
Last commit date
.idea
.idea
 
 
src
src
 
 
.env
.env
 
 
.gitignore
.gitignore
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
README.md
README.md
 
 

Repository files navigation

sidekick

dicebot

This bot rolls dice and evaluates simple math expressions in Discord messages

You interact with it by sending messages in a channel the bot can see

Requires you to update .env with a private DISCORD_TOKEN if you want to host your own

Commands

  • Short form:
    • /r <expression>
    • .r <expression>
    • !r <expression>
  • Long form:
    • /roll <expression>
    • .roll <expression>
    • !roll <expression>

Expression Syntax

Supported pieces of an expression:

  • Dice
    • NdM → roll N, M-sided dice (e.g. 3d6)
    • dM → shorthand for 1dM (e.g. d20)
  • Integers
    • Whole numbers (e.g. 5, -2)
  • Operators (integer arithmetic)
    • + addition
    • - subtraction
    • * multiplication
    • / division (truncating, DICE DON'T ROLL DECIMALS!)
    • ^ exponent (non-negative, limited size)
  • Parentheses
    • ( and ) to control order of operations

Operator precedence: ^ > * / > + -.

Exploding Dice (Unbound DRNs)

You can make dice “explode” – when a die meets a condition, it rolls again and adds to that die’s total.

  • Add ! after a dice term:

  • NdM! → explode on max (e.g. d6! explodes on 6)

  • NdM!<X – explode if a roll is less than X (e.g. d6!<3 explodes on 1–2)

  • NdM!=X – explode if a roll is equal to X (e.g. d10!=1 explodes on 1)

Each die may roll multiple times; all rolls for that die are summed, and only the final total per die is shown.

  • There is a hard cap on explosion chains of 512 rerolls to avoid infinite loops.

About

dicebot

Topics

dicedice-botdiscorddiscord-bot

Resources

Readme
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.