From 8c58768ac23244a93911717b770eb8f8aa151c26 Mon Sep 17 00:00:00 2001 From: shibedrill <53824200+shibedrill@users.noreply.github.com> Date: Tue, 23 Apr 2024 17:46:40 -0400 Subject: [PATCH] more fun commands --- src/command/fun.rs | 22 +++++++++++++++++++++- src/command/util.rs | 17 ++++++++++++++++- src/main.rs | 2 ++ 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/src/command/fun.rs b/src/command/fun.rs index e5ded93..88a36ff 100644 --- a/src/command/fun.rs +++ b/src/command/fun.rs @@ -1,6 +1,7 @@ use crate::Context; use crate::Error; +use poise::serenity_prelude as serenity; use rand::prelude::SliceRandom; use rand::*; @@ -14,7 +15,8 @@ pub async fn meow(ctx: Context<'_>) -> Result<(), Error> { "mraaw", "bwrrrr", "mrrghh", - "waoaugh,,,,", + "mrowwwwwwwwwwww", + "FUCK", ]; let response = { let mut rng = rand::thread_rng(); @@ -30,3 +32,21 @@ pub async fn meow(ctx: Context<'_>) -> Result<(), Error> { Ok(()) } +/// penis +#[poise::command(slash_command)] +pub async fn penis( + ctx: Context<'_>, + #[description = "The target user"] target: Option, +) -> Result<(), Error> { + if let Some(target_unwrapped) = target { + ctx.say(format!( + "<@{}> has been penised. they must penis another user to become un-penised", + target_unwrapped.id + )) + .await?; + info!("Executed command `penis` successfully"); + } else { + error!("Failed to execute command `penis`"); + } + Ok(()) +} diff --git a/src/command/util.rs b/src/command/util.rs index 1c3a238..2eac00c 100644 --- a/src/command/util.rs +++ b/src/command/util.rs @@ -3,6 +3,21 @@ use poise::serenity_prelude as serenity; use crate::Context; use crate::Error; +const INVITE_LINK: &str = "https://discord.com/oauth2/authorize?client_id=1030701552941412382&permissions=116736&response_type=code&redirect_uri=https%3A%2F%2Fdiscordapp.com%2Foauth2%2Fauthorize%3F%26client_id%3D1030701552941412382%26scope%3Dbot&scope=guilds+bot"; + +/// Add this bot to your server +#[poise::command(slash_command)] +pub async fn invite(ctx: Context<'_>) -> Result<(), Error> { + ctx.defer_ephemeral().await?; + ctx.say(format!( + "To add me to your server, click [this link]({}) and enable all the requested permissions.", + INVITE_LINK + )) + .await?; + info!("Executed command `invite` successfully"); + Ok(()) +} + /// Displays your or another user's account creation date #[poise::command(slash_command)] pub async fn age( @@ -48,7 +63,7 @@ pub async fn add_channel( info!("Executed command `add_channel` successfully"); } else { ctx.say("Channel with supplied ID was not found.").await?; - error!("Failed to execute command `add_channel`."); + error!("Failed to execute command `add_channel`"); } Ok(()) } diff --git a/src/main.rs b/src/main.rs index 669fc9a..844c80f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -83,11 +83,13 @@ async fn main() { add_channel(), remove_channel(), list_channels(), + invite(), // Dev shutdown(), restart(), // Fun meow(), + penis(), ], initialize_owners: true, ..Default::default()