moover_rust/src/commands/user_interactions/hug.rs

21 lines
546 B
Rust
Raw Normal View History

2024-10-06 14:53:12 +00:00
use poise;
use serenity::all::User;
use super::interaction::send_with_embed;
use crate::types::{Error, Context};
#[poise::command(
slash_command,
description_localized("en-US", "Hug all your friends!"),
category = "Interaction"
2024-10-06 14:53:12 +00:00
)]
pub async fn hug(ctx: Context<'_>,
#[description = "Who is the lucky one?"]
user: User
) -> Result<(), Error> {
let title = "HUGS!";
let desc = format!("{} hugs {}", ctx.author(), user);
send_with_embed(ctx, "hug", &title, &desc).await?;
ctx.reply("Done!").await?;
Ok(())
}