forked from sorceress/rustcord
looks like that .trim() was necessary after all
This commit is contained in:
parent
8d5a5821d6
commit
5944c30067
|
@ -399,7 +399,7 @@ fn compare_bot(ctx: &mut Context, message: &Message, mut args: Args) -> CommandR
|
||||||
#[command]
|
#[command]
|
||||||
#[aliases("what's this")]
|
#[aliases("what's this")]
|
||||||
fn what(ctx: &mut Context, message: &Message, args: Args) -> CommandResult {
|
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 defs = &urbandict::get_definitions(&text.to_string())?;
|
||||||
let def = &defs[0];
|
let def = &defs[0];
|
||||||
let _ = message.channel_id.send_message(&ctx.http, |m| {
|
let _ = message.channel_id.send_message(&ctx.http, |m| {
|
||||||
|
|
Loading…
Reference in New Issue