Quote and trim arguments in voting

This commit is contained in:
Natsu Kagami 2022-01-19 18:36:13 -05:00
parent 9ac8683c5d
commit 1a499e782a
Signed by: nki
GPG key ID: 7306B3D3C3AD6E51

View file

@ -39,7 +39,7 @@ pub async fn vote(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult
("🤢".to_owned(), "No! 🤢".to_owned()),
]
} else {
let choices: Vec<_> = args.iter().map(|v| v.unwrap()).collect();
let choices: Vec<_> = args.iter().quoted().trimmed().map(|v| v.unwrap()).collect();
if choices.len() < 2 {
// Where are the choices?
msg.reply(