Add a twist to the fuck command

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/52/head
trivernis 2 years ago
parent 7879062a82
commit 9be3ef833e
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

2
Cargo.lock generated

@ -2604,7 +2604,7 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
[[package]]
name = "tobi-rs"
version = "0.9.12"
version = "0.9.13"
dependencies = [
"animethemes-rs",
"aspotify",

@ -3,7 +3,7 @@ members=["bot-coreutils", "bot-database", "."]
[package]
name = "tobi-rs"
version = "0.9.12"
version = "0.9.13"
authors = ["trivernis <trivernis@protonmail.com>"]
edition = "2018"

@ -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::<UserId>()?;
let mut amount = args.single::<usize>().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::<usize>().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?;
}

Loading…
Cancel
Save