Skip to content

Roll Command

Roll dice using Python's d20 library.

Usage

!roll <dice expression>

Shorthand is !r

Description

The roll command allows you to roll any dice expression supported by the d20 library. This includes complex expressions with multiple dice types, modifiers, and comments.

Format

  • <dice expression>: Any valid dice expression (e.g., 1d20, 2d6+5, 1d20+1d4)

Examples

Basic Rolls

!roll 1d20
!roll 2d6
!roll 1d100

With Modifiers

!roll 1d20+5
!roll 2d6+3
!roll 1d20-2

Complex Expressions

!roll 1d20+1d4
!roll 2d6+1d8+5
!roll 1d20+1d6+2

With Comments

!roll 1d20+3 # attack roll
!roll 2d6+5 # damage
!roll 1d20 # initiative

Features

  • Critical detection: Automatically detects critical hits (20) and critical misses (1)
  • Comment support: Add comments after # to label your rolls
  • Complex expressions: Support for multiple dice types and modifiers
  • Avrae compatibility: Uses the same d20 library as Avrae

Integration

The roll command is the foundation for other roll-based commands: - !attack - Uses roll for attack and damage - !cast - Uses roll for spell casting - !check - Uses roll for skill checks - !rr - Uses roll for multiple iterations