Handle Roll Command Function
From Dontopedia, the open, paraconsistent wiki. (Last updated 2026-05-02.)
Handle Roll Command Function has 62 facts recorded in Dontopedia across 2 references, with 7 live disagreements.
Mostly:parses num dice(3), parses num sides(3), validates positive numbers(3)
Maturity scale
raw canonical shape-checked rule-derived certifiedInbound mentions (1)
Other subjects in dontopedia point AT this entity as a value. These are inverse relationships — e.g. "X motherOf this subject" — and answer questions the forward facts can't. Grouped by predicate.
providedCodeSnippetProvided Code Snippet(1)
- Omega Bot
ex:omega-bot
Other facts (62)
The long tail: predicates that appear too rarely to warrant their own section. Filter or scroll to find a specific one. Each row links to its source.
| Predicate | Value | Ref |
|---|---|---|
| Parses Num Dice | Num Dice Variable | [1] |
| Parses Num Dice | parseInt(match[1], 10) | [2] |
| Parses Num Dice | Match Group 1 | [2] |
| Parses Num Sides | Num Sides Variable | [1] |
| Parses Num Sides | parseInt(match[2], 10) | [2] |
| Parses Num Sides | Match Group 2 | [2] |
| Validates Positive Numbers | Num Dice Variable | [1] |
| Validates Positive Numbers | numDice <= 0 || numSides <= 0 | [2] |
| Validates Positive Numbers | null | [2] |
| Computes Total Sum | Total Variable | [1] |
| Computes Total Sum | Reduce Sum | [2] |
| Handles Command | Slash Command Roll | [1] |
| Handles Command | Slash Command Roll | [2] |
| Is Async | true | [1] |
| Is Async | null | [2] |
| Replies With Results | Rolled ${dice}: [${rolls.join(', ')}] Total: ${total} | [1] |
| Replies With Results | Rolled ${dice}: [${rolls.join(', ')}] Total: ${total} | [2] |
| Expects | Interaction From Discord Js V13 | [2] |
| Expects | Discord Js Interaction | [2] |
| Validates Dice Presence | true | [2] |
| Validates Dice Presence | null | [2] |
| Replies With Positive Error If Invalid | Number of dice and sides must be positive. | [1] |
| Checks Existence of | Dice Variable | [1] |
| Compatible With | Discord Js Library | [1] |
| Expects Library Version | discord.js v13+ | [1] |
| Extracts Value Using | Interaction Options Getstring | [1] |
| Generates Random Roll | Rolls Array | [1] |
| Initializes Array | Rolls Array | [1] |
| Is Exported | true | [1] |
| Is Minimal | true | [1] |
| Is Ready for Integration | true | [1] |
| Loops for Each Die | Num Dice Variable | [1] |
| Matches Pattern | Regex Ndm | [1] |
| Performs Early Return on Error | true | [1] |
| Purpose Is | rolling dice | [1] |
| Replies With Error If Missing | Please provide dice in NdM format, e.g. 2d6. | [1] |
| Replies With Invalid Format Error If No Match | Invalid dice format. Use NdM format, e.g. 2d6. | [1] |
| Assumes Valid Interaction | Interaction Object | [1] |
| Sequences Validation Before Rolling | Dice Validation | [1] |
| Sets Reply Ephemeral | true | [1] |
| Supports Example | 2d6 | [1] |
| Takes Parameter | Interaction Object | [1] |
| Uses Math Random | true | [1] |
| Replies With Positive Error | Number of dice and sides must be positive. | [2] |
| Computes Total With Reduce | Rolls | [2] |
| Depends on | Discord Js V13 | [2] |
| Exported As Module | module.exports = { handleRollCommand } | [2] |
| Rolls Each Die With | Math.floor(Math.random() * numSides) + 1 | [2] |
| Uses Regex Match | /^(\d+)d(\d+)$/i | [2] |
| Generates Rolls Array | Rolls | [2] |
| Gets String Option | Dice | [2] |
| Implements Dice Logic | Standalone Js | [2] |
| Replies With Error If No Dice | Please provide dice in NdM format, e.g. 2d6. | [2] |
| Replies With Invalid Format Error | Invalid dice format. Use NdM format, e.g. 2d6. | [2] |
| Capable of Handling | Valid Dice Input | [2] |
| Matches Against Regex | Dice Regex | [2] |
| Handles Invalid Format | null | [2] |
| Replies With Error If | Please provide dice in NdM format, e.g. 2d6. | [2] |
| Generates Rolls Loop | Math Random | [2] |
| Gets | Dice String | [2] |
| Is Exported As Module | null | [2] |
| Replies With | Roll Result String | [2] |
Timeline
Timeline axis is valid_time — when each source says the fact was true in the world, not when Dontopedia learned about it. Retracted rows are kept for provenance; coloured stripes indicate the context kind.
References (2)
See also
- Dice Variable
- Discord Js Library
- Total Variable
- Interaction Options Getstring
- Rolls Array
- Slash Command Roll
- Num Dice Variable
- Regex Ndm
- Num Sides Variable
- Interaction Object
- Dice Validation
- Rolls
- Discord Js V13
- Interaction From Discord Js V13
- Dice
- Standalone Js
- Valid Dice Input
- Dice Regex
- Match Group 1
- Match Group 2
- Reduce Sum
- Math Random
- Dice String
- Discord Js Interaction
- Roll Result String
Keep researching
Missing something or suspicious of what's here? Kick off a research session — a Claude agent will investigate, cite its sources, and file new facts into a dedicated context you can review before accepting into the shared view.