Dice

Configuring the Dice Rolling Module

The Dice Rolling module allows users to roll dice in the style of Dungeons & Dragons (DND). Users can specify the number of dice and the number of sides per die, as well as any modifiers to apply to the roll.

Commands and Usage

Roll Dice

Rolls dice in the format [number]d[number] with optional modifiers.

  • Usage:
    • ,roll [1d20]
    • ,dice [1d20]
  • Examples:
    • ,roll 1d20
    • ,roll 2d6+3
    • ,dice 4d10-2

Format

The command follows the format [number]d[number][modifier].

  • [number before d specifies the number of dice (default is 1).
  • [number] after d specifies the number of sides per die.
  • [modifier] is an optional part that specifies additional modifiers to the total roll (e.g., +2, -3).

Examples

  • Rolling a single 20-sided die:
    • ,roll 1d20
      • Response:
        • Rolled 1d20 and got 15
  • Rolling two 6-sided dice with a +3 modifier:
    • ,roll 2d6+3
      • Response:
        • Rolled 2d6+3 and got 3, 4 (total: 10)
  • Rolling four 10-sided dice with a -2 modifier:
    • ,roll 4d10-2
      • Response:
        • Rolled 4d10-2 and got 7, 2, 9, 3 (total: 19)

Constraints

  • Maximum number of dice: 6
  • Maximum number of sides per die: 100

If the user tries to roll more than the maximum allowed dice or sides, the bot will respond with an error message.

Notes

  • Use ,roll or ,dice to access the rolling functionality.
  • Ensure the format of the command is correct to avoid errors.