From e893d10eb5339703bbafcf656e846b9d530dc66b Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Sun, 1 Dec 2024 12:05:28 +0200 Subject: [PATCH] Bot API 8.0 - Emoji Status --- src/api_params.rs | 8 ++++++++ src/trait_async.rs | 1 + src/trait_sync.rs | 1 + 3 files changed, 10 insertions(+) diff --git a/src/api_params.rs b/src/api_params.rs index ec0b6d2..5d078b0 100644 --- a/src/api_params.rs +++ b/src/api_params.rs @@ -622,6 +622,14 @@ pub struct GetUserProfilePhotosParams { pub limit: Option, } +#[apply(apistruct!)] +#[derive(Eq)] +pub struct SetUserEmojiStatusParams { + pub user_id: u64, + pub emoji_status_custom_emoji_id: Option, + pub emoji_status_expiration_date: Option, +} + #[apply(apistruct!)] #[derive(Eq)] pub struct GetFileParams { diff --git a/src/trait_async.rs b/src/trait_async.rs index 8804ebb..b0708fc 100644 --- a/src/trait_async.rs +++ b/src/trait_async.rs @@ -314,6 +314,7 @@ where request!(sendChatAction, bool); request!(setMessageReaction, bool); request!(getUserProfilePhotos, UserProfilePhotos); + request!(setUserEmojiStatus, bool); request!(getFile, FileObject); request!(banChatMember, bool); request!(unbanChatMember, bool); diff --git a/src/trait_sync.rs b/src/trait_sync.rs index dd58167..c8d6430 100644 --- a/src/trait_sync.rs +++ b/src/trait_sync.rs @@ -286,6 +286,7 @@ pub trait TelegramApi { request!(sendChatAction, bool); request!(setMessageReaction, bool); request!(getUserProfilePhotos, UserProfilePhotos); + request!(setUserEmojiStatus, bool); request!(getFile, FileObject); request!(banChatMember, bool); request!(unbanChatMember, bool);