Make arguments required

This commit is contained in:
shibedrill 2024-04-25 15:06:43 -04:00
parent 96bd73b783
commit dd696437d4

View File

@ -36,18 +36,14 @@ pub async fn meow(ctx: Context<'_>) -> Result<(), Error> {
#[poise::command(slash_command)] #[poise::command(slash_command)]
pub async fn penis( pub async fn penis(
ctx: Context<'_>, ctx: Context<'_>,
#[description = "The target user"] target: Option<serenity::User>, #[description = "The target user"] target: serenity::User,
) -> Result<(), Error> { ) -> Result<(), Error> {
if let Some(target_unwrapped) = target {
ctx.say(format!( ctx.say(format!(
"<@{}> has been penised. they must penis another user to become un-penised", "<@{}> has been penised. they must penis another user to become un-penised",
target_unwrapped.id target.id
)) ))
.await?; .await?;
info!("Executed command `penis` successfully"); info!("Executed command `penis` successfully");
} else {
error!("Failed to execute command `penis`");
}
Ok(()) Ok(())
} }
@ -90,18 +86,14 @@ pub async fn eightball(ctx: Context<'_>) -> Result<(), Error> {
#[poise::command(slash_command)] #[poise::command(slash_command)]
pub async fn bite( pub async fn bite(
ctx: Context<'_>, ctx: Context<'_>,
#[description = "The target user"] target: Option<serenity::User>, #[description = "The target user"] target: serenity::User,
) -> Result<(), Error> { ) -> Result<(), Error> {
if let Some(target_unwrapped) = target {
ctx.say(format!( ctx.say(format!(
"<@{}> has been bitten by <@{}>", "<@{}> has been bitten by <@{}>",
target_unwrapped.id, target.id,
ctx.author().id, ctx.author().id,
)) ))
.await?; .await?;
info!("Executed command `bite` successfully"); info!("Executed command `bite` successfully");
} else {
error!("Failed to execute command `bite`");
}
Ok(()) Ok(())
} }