more fun commands

This commit is contained in:
shibedrill 2024-04-23 17:46:40 -04:00
parent 7e3e940393
commit 8c58768ac2
3 changed files with 39 additions and 2 deletions

View File

@ -1,6 +1,7 @@
use crate::Context; use crate::Context;
use crate::Error; use crate::Error;
use poise::serenity_prelude as serenity;
use rand::prelude::SliceRandom; use rand::prelude::SliceRandom;
use rand::*; use rand::*;
@ -14,7 +15,8 @@ pub async fn meow(ctx: Context<'_>) -> Result<(), Error> {
"mraaw", "mraaw",
"bwrrrr", "bwrrrr",
"mrrghh", "mrrghh",
"waoaugh,,,,", "mrowwwwwwwwwwww",
"FUCK",
]; ];
let response = { let response = {
let mut rng = rand::thread_rng(); let mut rng = rand::thread_rng();
@ -30,3 +32,21 @@ pub async fn meow(ctx: Context<'_>) -> Result<(), Error> {
Ok(()) Ok(())
} }
/// penis
#[poise::command(slash_command)]
pub async fn penis(
ctx: Context<'_>,
#[description = "The target user"] target: Option<serenity::User>,
) -> 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(())
}

View File

@ -3,6 +3,21 @@ use poise::serenity_prelude as serenity;
use crate::Context; use crate::Context;
use crate::Error; 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 /// Displays your or another user's account creation date
#[poise::command(slash_command)] #[poise::command(slash_command)]
pub async fn age( pub async fn age(
@ -48,7 +63,7 @@ pub async fn add_channel(
info!("Executed command `add_channel` successfully"); info!("Executed command `add_channel` successfully");
} else { } else {
ctx.say("Channel with supplied ID was not found.").await?; 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(()) Ok(())
} }

View File

@ -83,11 +83,13 @@ async fn main() {
add_channel(), add_channel(),
remove_channel(), remove_channel(),
list_channels(), list_channels(),
invite(),
// Dev // Dev
shutdown(), shutdown(),
restart(), restart(),
// Fun // Fun
meow(), meow(),
penis(),
], ],
initialize_owners: true, initialize_owners: true,
..Default::default() ..Default::default()