serenity
serenity copied to clipboard
e17_message_components - Custom Emoji for message components
Description
Hello, I think it would be a good thing to add an example of custom emoji usage for the e17_message_components example.
For instance:
use serenity::builder::CreateButton;
use serenity::model::id::EmojiId;
use serenity::model::application::component::ButtonStyle;
let custom_emoji = EmojiId(1234567890); // the custom emoji
let button = CreateButton::default();
button
.custom_id("custom_emoji_button_id")
.style(ButtonStyle::Primary)
.emoji(custom_emoji)
.label("");
Enhancement
Could also add another enum for custom emojis, that would contain functions returning EmojiId.
Motivation
As a new Serenity user, I had a really bad time finding a way to use a custom emoji in a message component. I think that it could save a lot of time to newcomers.
Thank you.
EDIT: Adds Enhancement section