From 379f0f2ca04497a61071bf86570fcd76e91a1557 Mon Sep 17 00:00:00 2001 From: tec <tec@ucc.gu.uwa.edu.au> Date: Tue, 26 May 2020 20:33:18 +0800 Subject: [PATCH] Make the !source command output more saucy --- src/main.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 9025699..fef1b80 100644 --- a/src/main.rs +++ b/src/main.rs @@ -61,7 +61,8 @@ impl EventHandler for Handler { fn message(&self, ctx: Context, msg: Message) { if !(msg.content.starts_with(&CONFIG.command_prefix)) { if msg.content.contains(&format!("<@!{}>", CONFIG.bot_id)) // desktop mentions - || msg.content.contains(&format!("<@{}>", CONFIG.bot_id)) // mobile mentions + || msg.content.contains(&format!("<@{}>", CONFIG.bot_id)) + // mobile mentions { send_message!( msg.channel_id, @@ -91,11 +92,13 @@ impl EventHandler for Handler { "poll" => voting::Commands::poll(ctx, msg.clone(), content), "cowsay" => voting::Commands::cowsay(ctx, msg.clone(), content), "source" => { - send_message!( - msg.channel_id, - &ctx.http, - "You want to look at my insides!? Eurgh. \n Just kidding, you can go over every inch of me here: https://gitlab.ucc.asn.au/UCC/discord-bot" + let mut mesg = MessageBuilder::new(); + mesg.push( + "You want to look at my insides!? Eurgh.\nJust kidding, you can go over ", ); + mesg.push_italic("every inch "); + mesg.push("of me here: https://gitlab.ucc.asn.au/UCC/discord-bot 😉"); + send_message!(msg.channel_id, &ctx.http, mesg.build()); } "help" => { // Plaintext version, keep in case IRC users kick up a fuss -- GitLab