aboutsummaryrefslogtreecommitdiff
path: root/src/commands/actions.rs
diff options
context:
space:
mode:
authorCara Salter <cara@devcara.com>2022-01-16 00:02:56 -0500
committerCara Salter <cara@devcara.com>2022-01-16 00:02:56 -0500
commiteb41fede91d072693b279f908976d2ebc2ba1ca3 (patch)
tree81154fe49330b429e66fff098653fc636747717c /src/commands/actions.rs
parent16921c23ff7186381a16ca0b03c521d56ee4eb21 (diff)
downloadglitch-ng-eb41fede91d072693b279f908976d2ebc2ba1ca3.tar.gz
glitch-ng-eb41fede91d072693b279f908976d2ebc2ba1ca3.zip
format
Diffstat (limited to 'src/commands/actions.rs')
-rw-r--r--src/commands/actions.rs30
1 files changed, 22 insertions, 8 deletions
diff --git a/src/commands/actions.rs b/src/commands/actions.rs
index 96862bb..63d00fb 100644
--- a/src/commands/actions.rs
+++ b/src/commands/actions.rs
@@ -78,11 +78,18 @@ static BOOP_VEC: [&'static str; 15] = [
/// Usage:
/// ~boop <@User>
#[poise::command(context_menu_command = "Boop!", slash_command, prefix_command)]
-pub async fn boop(ctx: Context<'_>,
- #[description = "The user to be booped"] user: serenity::User,
- ) -> Result<(), Error> {
+pub async fn boop(
+ ctx: Context<'_>,
+ #[description = "The user to be booped"] user: serenity::User,
+) -> Result<(), Error> {
let url = get_random_url_from_vec(BOOP_VEC.to_vec());
- ctx.say(format!("<@{}> boops <@{}>! Awwwww!\n{}", ctx.author().id.0, user.id.0, url)).await?;
+ ctx.say(format!(
+ "<@{}> boops <@{}>! Awwwww!\n{}",
+ ctx.author().id.0,
+ user.id.0,
+ url
+ ))
+ .await?;
Ok(())
}
@@ -92,11 +99,18 @@ pub async fn boop(ctx: Context<'_>,
/// Usage:
/// ~hug <@User>
#[poise::command(context_menu_command = "Hug!", slash_command, prefix_command)]
-pub async fn hug(ctx: Context<'_>,
- #[description = "The user to be hugged"] user: serenity::User,
- ) -> Result<(), Error> {
+pub async fn hug(
+ ctx: Context<'_>,
+ #[description = "The user to be hugged"] user: serenity::User,
+) -> Result<(), Error> {
let url = get_random_url_from_vec(HUG_VEC.to_vec());
- ctx.say(format!("<@{}> hugs <@{}>! So kind of them.\n{}", ctx.author().id.0, user.id.0, url)).await?;
+ ctx.say(format!(
+ "<@{}> hugs <@{}>! So kind of them.\n{}",
+ ctx.author().id.0,
+ user.id.0,
+ url
+ ))
+ .await?;
Ok(())
}