From 9d5e73edee8e262676daa2acc22075fa02aa1b97 Mon Sep 17 00:00:00 2001 From: Nilstrieb Date: Wed, 5 May 2021 17:47:24 +0200 Subject: [PATCH] uwuify replies --- src/commands.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/commands.rs b/src/commands.rs index eff1ff2..9514799 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -52,7 +52,10 @@ async fn say(ctx: &Context, msg: &Message, args: Args) -> CommandResult { #[command] #[description("uwuifies the arguments, or the last message in the channel if no args are supplied")] async fn uwuify(ctx: &Context, msg: &Message, args: Args) -> CommandResult { - if args.is_empty() { + if let Some(parent) = &msg.referenced_message { + let uwu = uwuify_str_sse(&*parent.content); + msg.channel_id.say(&ctx.http, uwu).await?; + } else if args.is_empty() { let mut data = ctx.data.write().await; let map = data.get_mut::().expect("No LastMessageInChannel in TypeMap"); let old_message = map.get(&msg.channel_id);