Fix parsing bug
This commit is contained in:
parent
6cfe65f7b9
commit
7959ac54da
@ -280,7 +280,7 @@ impl Bot {
|
|||||||
"roll" => {
|
"roll" => {
|
||||||
for word in words {
|
for word in words {
|
||||||
let max = word
|
let max = word
|
||||||
.parse::<i64>()
|
.parse::<u64>()
|
||||||
.map_err(|error| format!("Failed to parse integer: {error}"))?;
|
.map_err(|error| format!("Failed to parse integer: {error}"))?;
|
||||||
let random = thread_rng().gen_range(1..max);
|
let random = thread_rng().gen_range(1..max);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user