blob: bbae0b5293739b97420fc1ec9a830fa8e0307826 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
use crate::{client::Context, consts::Colors};
use eyre::Result;
use poise::{
serenity_prelude::{CreateEmbed, Emoji},
CreateReply,
};
/// Get the URL for an emoji
#[poise::command(slash_command)]
pub async fn emoji(ctx: Context<'_>, emoji: Emoji) -> Result<()> {
let url = emoji.url();
let embed = CreateEmbed::new()
.title(emoji.name)
.color(Colors::Blue)
.image(&url)
.url(&url);
let message = CreateReply::default().embed(embed);
ctx.send(message).await?;
Ok(())
}
|