From 00eaa1335dfe1ff1efeedf56d730eb8300894826 Mon Sep 17 00:00:00 2001 From: EvilDeaaaadd Date: Tue, 1 Oct 2019 00:42:52 +0300 Subject: [PATCH] looks like that .trim() was necessary after all --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 20d85a2..fafe695 100644 --- a/src/main.rs +++ b/src/main.rs @@ -399,7 +399,7 @@ fn compare_bot(ctx: &mut Context, message: &Message, mut args: Args) -> CommandR #[command] #[aliases("what's this")] fn what(ctx: &mut Context, message: &Message, args: Args) -> CommandResult { - let text: String = args.rest().to_string(); + let text: String = args.rest().trim().to_string(); let defs = &urbandict::get_definitions(&text.to_string())?; let def = &defs[0]; let _ = message.channel_id.send_message(&ctx.http, |m| {