Skip to content

Commit

Permalink
Update multi roll logic to use ;
Browse files Browse the repository at this point in the history
Moving mutli roll logic from / to ; to resolve an issue with division
operations but also align with other dice rolling bots on the discord
app market.
  • Loading branch information
Humblemonk committed Jun 27, 2024
1 parent eeab9da commit 4208a3c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ A roll set is possible. Below is an example of the command:

`/roll 6 4d6` : Roll 6 sets of four six-sided dice. A size of a set can be between 2 and 20.

Or you can combine multiple unique rolls in a single request. The max unique rolls here is **four** due to Discord API limitations. Example roll is as follows:
Or you can combine multiple unique rolls in a single request. The max unique rolls here is **four** due to Discord API limitations. Rolls are separated with a semicolon. Example roll is as follows:

`/roll 4d100 / 10d6 e6 k8 +4/ 3d10 k2/ ul 3d100`
`/roll 4d100 ; 10d6 e6 k8 +4; 3d10 k2; ul 3d100`

**Note:** Multi roll support is in a "beta feature" stage and some more complicated rolls may cause issues. Please report on github if you run into a problem!

Expand Down
4 changes: 2 additions & 2 deletions dice_maiden.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dice bot for Discord
# Author: Humblemonk
# Version: 9.0.2
# Version: 9.0.3
# Copyright (c) 2017. All rights reserved.
# !/usr/bin/ruby
# If you wish to run a single instance of this bot, please follow the "Manual Install" section of the readme!
Expand Down Expand Up @@ -54,7 +54,7 @@
response_array = []
begin
inc_event_roll = event.options.values.join('')
rolls_array = inc_event_roll.split(%r{\s*/\s*}).take(4)
rolls_array = inc_event_roll.split(/\s*;\s*/).take(4)
rolls_array.each do |event_roll|
@do_tally_shuffle = false
check_comment(event_roll)
Expand Down
5 changes: 5 additions & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 9.0.3 -2024-06-27
### Added
- Updated multi roll logic to use semi colons to break between roll sets.
Resolves an issue with doing division commands

## 9.0.2 -2024-06-24
### Added
- Resolved an issue where numbers in comments broke rolls
Expand Down

0 comments on commit 4208a3c

Please sign in to comment.