From 9be3ef833e3dd7d9102c7e3b220333d84408eee4 Mon Sep 17 00:00:00 2001 From: trivernis Date: Tue, 12 Apr 2022 22:10:53 +0200 Subject: [PATCH] Add a twist to the fuck command Signed-off-by: trivernis --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/commands/misc/fuck.rs | 14 +++++++++++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7a02b75..c05c859 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2604,7 +2604,7 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tobi-rs" -version = "0.9.12" +version = "0.9.13" dependencies = [ "animethemes-rs", "aspotify", diff --git a/Cargo.toml b/Cargo.toml index 598938c..b2c48c3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members=["bot-coreutils", "bot-database", "."] [package] name = "tobi-rs" -version = "0.9.12" +version = "0.9.13" authors = ["trivernis "] edition = "2018" diff --git a/src/commands/misc/fuck.rs b/src/commands/misc/fuck.rs index adee9c5..b5784b0 100644 --- a/src/commands/misc/fuck.rs +++ b/src/commands/misc/fuck.rs @@ -3,6 +3,7 @@ use serenity::framework::standard::macros::command; use serenity::framework::standard::{Args, CommandResult}; use serenity::model::channel::Message; use serenity::model::id::UserId; +use std::time::Duration; #[command] #[description("Fuck this person in particular")] @@ -14,8 +15,14 @@ use serenity::model::id::UserId; async fn fuck(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult { let person = args.single::()?; let mut amount = args.single::().unwrap_or(3); - if amount > 10 { - amount = 10; + if amount > 3 { + msg.reply(&ctx.http, "Don't you think that's a bit much?") + .await?; + tokio::time::sleep(Duration::from_secs(2)).await; + amount = 3; + } else { + msg.reply(&ctx.http, "no").await?; + tokio::time::sleep(Duration::from_secs(1)).await; } let mut verbosity = args.single::().unwrap_or(1); if verbosity == 0 { @@ -28,9 +35,10 @@ async fn fuck(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult { 4 => "fck", _ => "fuck", }; + for _ in 0..amount { msg.channel_id - .say(&ctx, format!("{} <@{}>", fuck_word, person)) + .say(&ctx, format!("{} <@{}>", fuck_word, msg.author.id)) .await?; }