Function parseRollEquation

  • Convert a roll equation to dddice json post body format theme can be a theme's id Ex. 'dddice-bees' or an entire ITheme. If the latter, the parser will validate the dice in the equation against the available_dice in the theme


    • equation: string

      Required dice equation in Roll20 format (ex 1d6+5)

    • theme: string | ITheme

      dice theme to roll the equation with. Can be a theme's id ex 'dddice-bees' or an entire theme object.

    • Optional values: (string | number)[]

      array of roll result values to use for setting results

    Returns {
        dice: IDiceRoll[];
        operator: Operator;

    array of dice and operator object to pass to dddice roll api

Generated using TypeDoc