UNPKG

dice-roller-parser

Version:

A javascript dice roller that parses roll20 format strings and generates rolled outputs

21 lines (20 loc) 742 B
import { RollBase } from "./rollTypes"; /** An example renderer class that renders a roll to a string in a markdown format, compatible with Discord */ export declare class DiscordRollRenderer { /** * Renders a dice roll in a format compatible with Discord * @param roll a {@link RollBase} object that has been generated by the {@link DiceRoller} * @returns a string representing the roll that can be used on Discord */ render(roll: RollBase): string; private doRender; private renderGroup; private renderGroupExpr; private renderDie; private renderExpression; private renderFunction; private addBrackets; private stripBrackets; private renderRoll; private renderFateRoll; }