Only consume max allowed commands + 1 when dealing with multiple commands
This commit is contained in:
parent
8e4eb574d2
commit
d30d39ff1e
|
@ -189,6 +189,7 @@ impl DiceBot {
|
|||
let commands: Vec<&str> = msg_body
|
||||
.lines()
|
||||
.filter(|line| line.starts_with("!"))
|
||||
.take(MAX_COMMANDS_PER_MESSAGE + 1)
|
||||
.collect();
|
||||
|
||||
//Up to 50 commands allowed, otherwise we send back an error.
|
||||
|
|
Loading…
Reference in New Issue