50 lines
1.3 KiB
Rust
50 lines
1.3 KiB
Rust
use crate::{command, group, GlobalData};
|
|
use serenity::client::Context;
|
|
use serenity::framework::standard::{Args, CommandResult};
|
|
use serenity::model::channel::Message;
|
|
|
|
#[group]
|
|
#[commands(nudetayne, tayne, celeryman)]
|
|
pub struct CeleryMan;
|
|
|
|
#[command]
|
|
#[aliases("NUDETAYNE")]
|
|
#[only_in(guilds)]
|
|
async fn nudetayne(ctx: &Context, msg: &Message, _args: Args) -> CommandResult {
|
|
if msg.content.starts_with("!nudetayne") {
|
|
msg.reply(&ctx.http, "Not computing, please repeat.")
|
|
.await?;
|
|
} else if msg.content.starts_with("!NUDETAYNE") {
|
|
let mut data = ctx.data.write().await;
|
|
let global_data = data.get_mut::<GlobalData>().unwrap();
|
|
msg.reply(&ctx.http, "This is not suitable for work are you sure?")
|
|
.await?;
|
|
|
|
global_data.bot_state.accepted_nsfw = Some(msg.author.id);
|
|
}
|
|
|
|
Ok(())
|
|
}
|
|
|
|
#[command]
|
|
#[only_in(guilds)]
|
|
async fn tayne(ctx: &Context, msg: &Message, _args: Args) -> CommandResult {
|
|
msg.reply(
|
|
&ctx.http,
|
|
"https://media.tenor.com/115eUl2XUaAAAAAM/flarhgunnstow-paul-rudd.gif",
|
|
)
|
|
.await?;
|
|
Ok(())
|
|
}
|
|
|
|
#[command]
|
|
#[only_in(guilds)]
|
|
async fn celeryman(ctx: &Context, msg: &Message, _args: Args) -> CommandResult {
|
|
msg.reply(
|
|
&ctx.http,
|
|
"https://media.tenor.com/1iOUXZFLpBgAAAAM/dance-dancing.gif",
|
|
)
|
|
.await?;
|
|
Ok(())
|
|
}
|