From 036034fbb593e5edef359b82d7c4da1604800209 Mon Sep 17 00:00:00 2001 From: Agatha Date: Sun, 29 Mar 2020 19:27:33 +0300 Subject: [PATCH] Rewrite uwu command --- src/main.rs | 44 +++++++++++--------------------------------- 1 file changed, 11 insertions(+), 33 deletions(-) diff --git a/src/main.rs b/src/main.rs index 9609e84..6fcaa85 100755 --- a/src/main.rs +++ b/src/main.rs @@ -340,38 +340,16 @@ fn headpat(ctx: &mut Context, message: &Message, args: Args) -> CommandResult { #[command] fn uwu(ctx: &mut Context, message: &Message) -> CommandResult { - let num = rand::thread_rng().gen_range(0, 4); - match num { - 0 => { - let _ = message.channel_id.send_message(&ctx.http, |m| m - .embed(|e| e - .image("https://i.redditmedia.com/qDD9W7NJqTAk31y061TuRW9R8qOcCuEmmCWyOsUEavE.png?fit=crop&crop=faces%2Centropy&arh=2&w=640&s=ebdd3f1970b4fe70ccd24a1958e7fc32") - )); - } - 1 => { - let _ = message.channel_id.send_message(&ctx.http, |m| m - .embed(|e| e - .image("https://www.shitpostbot.com/img/sourceimages/smash-that-mfuckn-uwu-button-57b5aa1de9fe4.jpeg") - )); - } - 2 => { - let _ = message.channel_id.send_message(&ctx.http, |m| { - m.embed(|e| { - e - .image("https://www.shitpostbot.com/img/sourceimages/fallout-nv-owo-57e586ae15322.jpeg") - }) - }); - } - 3 => { - let _ = message.channel_id.send_message(&ctx.http, |m| m - .embed(|e| e - .image("https://i.redditmedia.com/-JaK9YW7mPz2S2xBJmXvW4fZ58uGMa4l6GIgYt3dqZg.jpg?fit=crop&crop=faces%2Centropy&arh=2&w=640&s=ebab29a577346b4d18ec914538b69bb4") - )); - } - _ => { - let _ = message.channel_id.say(&ctx.http, "UwU"); - } - } + let images = [ + "https://i.redditmedia.com/qDD9W7NJqTAk31y061TuRW9R8qOcCuEmmCWyOsUEavE.png?fit=crop&crop=faces%2Centropy&arh=2&w=640&s=ebdd3f1970b4fe70ccd24a1958e7fc32", + "https://www.shitpostbot.com/img/sourceimages/smash-that-mfuckn-uwu-button-57b5aa1de9fe4.jpeg", + "https://www.shitpostbot.com/img/sourceimages/fallout-nv-owo-57e586ae15322.jpeg", + "https://i.redditmedia.com/-JaK9YW7mPz2S2xBJmXvW4fZ58uGMa4l6GIgYt3dqZg.jpg?fit=crop&crop=faces%2Centropy&arh=2&w=640&s=ebab29a577346b4d18ec914538b69bb4" + ]; + let num = rand::thread_rng().gen_range(0, images.len()); + let _ = message + .channel_id + .send_message(&ctx.http, |m| m.embed(|e| e.image(images[num]))); Ok(()) } @@ -446,7 +424,7 @@ fn help(ctx: &mut Context, message: &Message) -> CommandResult { ("owo sausage", "sosig", false), ("owo help", "Help the fellow humanz!", false), ("owo info", "Show information about me!", false), - /*( + /*( "owo compare_bot ``bot's name``", "Compare me to other robots!", false,