From 766de88a334f30f01f3a449b50ecc7b25c57cb06 Mon Sep 17 00:00:00 2001 From: Agatha Rose Date: Thu, 18 Jun 2020 15:34:44 +0300 Subject: [PATCH] Make !pfp fall back to current user --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 6e05cc7..f5c333e 100755 --- a/src/main.rs +++ b/src/main.rs @@ -701,9 +701,9 @@ fn define(ctx: &mut Context, message: &Message, args: Args) -> CommandResult { #[command] fn pfp(ctx: &mut Context, message: &Message) -> CommandResult { - // Get username from first mention, otherwise use input text + // Get username from first mention, otherwise use current username let user = match message.mentions.len() { - 0 => return Err(CommandError("Please specify a username!".to_string())), + 0 => &message.author, _ => &message.mentions[0], };