add: emojis is_animated

This commit is contained in:
trisua 2025-05-05 23:27:05 -04:00
parent 8e88cbbc6f
commit 570a290954
4 changed files with 19 additions and 5 deletions

View file

@ -46,13 +46,20 @@ pub struct CustomEmoji {
pub community: usize,
pub upload_id: usize,
pub name: String,
pub is_animated: bool,
}
pub type EmojiParserResult = Vec<(String, usize, String)>;
impl CustomEmoji {
/// Create a new [`CustomEmoji`].
pub fn new(owner: usize, community: usize, upload_id: usize, name: String) -> Self {
pub fn new(
owner: usize,
community: usize,
upload_id: usize,
name: String,
is_animated: bool,
) -> Self {
Self {
id: AlmostSnowflake::new(1234567890)
.to_string()
@ -63,6 +70,7 @@ impl CustomEmoji {
community,
upload_id,
name,
is_animated,
}
}