mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
TBA 6.3: methods
This commit is contained in:
parent
eeb06337ee
commit
0dd44fe739
39 changed files with 855 additions and 41 deletions
|
@ -230,6 +230,11 @@ Schema(
|
|||
ty: RawTy("Recipient"),
|
||||
descr: Doc(md: "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)")
|
||||
),
|
||||
Param(
|
||||
name: "message_thread_id",
|
||||
ty: Option(i32),
|
||||
descr: Doc(md: "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"),
|
||||
),
|
||||
Param(
|
||||
name: "text",
|
||||
ty: String,
|
||||
|
@ -304,6 +309,11 @@ Schema(
|
|||
ty: RawTy("Recipient"),
|
||||
descr: Doc(md: "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"),
|
||||
),
|
||||
Param(
|
||||
name: "message_thread_id",
|
||||
ty: Option(i32),
|
||||
descr: Doc(md: "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"),
|
||||
),
|
||||
Param(
|
||||
name: "from_chat_id",
|
||||
ty: RawTy("Recipient"),
|
||||
|
@ -344,6 +354,11 @@ Schema(
|
|||
ty: RawTy("Recipient"),
|
||||
descr: Doc(md: "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"),
|
||||
),
|
||||
Param(
|
||||
name: "message_thread_id",
|
||||
ty: Option(i32),
|
||||
descr: Doc(md: "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"),
|
||||
),
|
||||
Param(
|
||||
name: "from_chat_id",
|
||||
ty: RawTy("Recipient"),
|
||||
|
@ -423,6 +438,11 @@ Schema(
|
|||
ty: RawTy("Recipient"),
|
||||
descr: Doc(md: "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)")
|
||||
),
|
||||
Param(
|
||||
name: "message_thread_id",
|
||||
ty: Option(i32),
|
||||
descr: Doc(md: "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"),
|
||||
),
|
||||
Param(
|
||||
name: "photo",
|
||||
ty: RawTy("InputFile"),
|
||||
|
@ -503,6 +523,11 @@ Schema(
|
|||
ty: RawTy("Recipient"),
|
||||
descr: Doc(md: "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"),
|
||||
),
|
||||
Param(
|
||||
name: "message_thread_id",
|
||||
ty: Option(i32),
|
||||
descr: Doc(md: "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"),
|
||||
),
|
||||
Param(
|
||||
name: "audio",
|
||||
ty: RawTy("InputFile"),
|
||||
|
@ -603,6 +628,11 @@ Schema(
|
|||
ty: RawTy("Recipient"),
|
||||
descr: Doc(md: "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"),
|
||||
),
|
||||
Param(
|
||||
name: "message_thread_id",
|
||||
ty: Option(i32),
|
||||
descr: Doc(md: "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"),
|
||||
),
|
||||
Param(
|
||||
name: "document",
|
||||
ty: RawTy("InputFile"),
|
||||
|
@ -696,6 +726,11 @@ Schema(
|
|||
ty: RawTy("Recipient"),
|
||||
descr: Doc(md: "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"),
|
||||
),
|
||||
Param(
|
||||
name: "message_thread_id",
|
||||
ty: Option(i32),
|
||||
descr: Doc(md: "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"),
|
||||
),
|
||||
Param(
|
||||
name: "video",
|
||||
ty: RawTy("InputFile"),
|
||||
|
@ -802,6 +837,11 @@ Schema(
|
|||
ty: RawTy("Recipient"),
|
||||
descr: Doc(md: "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"),
|
||||
),
|
||||
Param(
|
||||
name: "message_thread_id",
|
||||
ty: Option(i32),
|
||||
descr: Doc(md: "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"),
|
||||
),
|
||||
Param(
|
||||
name: "animation",
|
||||
ty: RawTy("InputFile"),
|
||||
|
@ -898,7 +938,7 @@ Schema(
|
|||
"Message": "https://core.telegram.org/bots/api#message",
|
||||
},
|
||||
),
|
||||
tg_doc: "https://core.telegram.org/bots/api#sendaudio",
|
||||
tg_doc: "https://core.telegram.org/bots/api#sendvoice",
|
||||
tg_category: "Available methods",
|
||||
params: [
|
||||
Param(
|
||||
|
@ -906,6 +946,11 @@ Schema(
|
|||
ty: RawTy("Recipient"),
|
||||
descr: Doc(md: "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"),
|
||||
),
|
||||
Param(
|
||||
name: "message_thread_id",
|
||||
ty: Option(i32),
|
||||
descr: Doc(md: "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"),
|
||||
),
|
||||
Param(
|
||||
name: "voice",
|
||||
ty: RawTy("InputFile"),
|
||||
|
@ -986,6 +1031,11 @@ Schema(
|
|||
ty: RawTy("Recipient"),
|
||||
descr: Doc(md: "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"),
|
||||
),
|
||||
Param(
|
||||
name: "message_thread_id",
|
||||
ty: Option(i32),
|
||||
descr: Doc(md: "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"),
|
||||
),
|
||||
Param(
|
||||
name: "video_note",
|
||||
ty: RawTy("InputFile"),
|
||||
|
@ -1064,6 +1114,11 @@ Schema(
|
|||
ty: RawTy("Recipient"),
|
||||
descr: Doc(md: "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)")
|
||||
),
|
||||
Param(
|
||||
name: "message_thread_id",
|
||||
ty: Option(i32),
|
||||
descr: Doc(md: "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"),
|
||||
),
|
||||
Param(
|
||||
name: "media",
|
||||
ty: ArrayOf(RawTy("InputMedia")),
|
||||
|
@ -1109,6 +1164,11 @@ Schema(
|
|||
ty: RawTy("Recipient"),
|
||||
descr: Doc(md: "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"),
|
||||
),
|
||||
Param(
|
||||
name: "message_thread_id",
|
||||
ty: Option(i32),
|
||||
descr: Doc(md: "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"),
|
||||
),
|
||||
Param(
|
||||
name: "latitude",
|
||||
ty: f64,
|
||||
|
@ -1392,6 +1452,11 @@ Schema(
|
|||
ty: RawTy("Recipient"),
|
||||
descr: Doc(md: "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)")
|
||||
),
|
||||
Param(
|
||||
name: "message_thread_id",
|
||||
ty: Option(i32),
|
||||
descr: Doc(md: "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"),
|
||||
),
|
||||
Param(
|
||||
name: "latitude",
|
||||
ty: f64,
|
||||
|
@ -1486,6 +1551,11 @@ Schema(
|
|||
ty: RawTy("Recipient"),
|
||||
descr: Doc(md: "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)")
|
||||
),
|
||||
Param(
|
||||
name: "message_thread_id",
|
||||
ty: Option(i32),
|
||||
descr: Doc(md: "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"),
|
||||
),
|
||||
Param(
|
||||
name: "phone_number",
|
||||
ty: String,
|
||||
|
@ -1560,6 +1630,11 @@ Schema(
|
|||
ty: RawTy("Recipient"),
|
||||
descr: Doc(md: "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)")
|
||||
),
|
||||
Param(
|
||||
name: "message_thread_id",
|
||||
ty: Option(i32),
|
||||
descr: Doc(md: "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"),
|
||||
),
|
||||
Param(
|
||||
name: "question",
|
||||
ty: String,
|
||||
|
@ -1674,6 +1749,11 @@ Schema(
|
|||
ty: RawTy("Recipient"),
|
||||
descr: Doc(md: "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)")
|
||||
),
|
||||
Param(
|
||||
name: "message_thread_id",
|
||||
ty: Option(i32),
|
||||
descr: Doc(md: "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"),
|
||||
),
|
||||
Param(
|
||||
name: "emoji",
|
||||
ty: Option(RawTy("DiceEmoji")),
|
||||
|
@ -1942,11 +2022,6 @@ Schema(
|
|||
ty: Option(bool),
|
||||
descr: Doc(md: "Pass True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege"),
|
||||
),
|
||||
Param(
|
||||
name: "can_change_info",
|
||||
ty: Option(bool),
|
||||
descr: Doc(md: "Pass True, if the administrator can change chat title, photo and other settings")
|
||||
),
|
||||
Param(
|
||||
name: "can_post_messages",
|
||||
ty: Option(bool),
|
||||
|
@ -1967,26 +2042,36 @@ Schema(
|
|||
ty: Option(bool),
|
||||
descr: Doc(md: "Pass True, if the administrator can manage video chats, supergroups only")
|
||||
),
|
||||
Param(
|
||||
name: "can_invite_users",
|
||||
ty: Option(bool),
|
||||
descr: Doc(md: "Pass True, if the administrator can invite new users to the chat")
|
||||
),
|
||||
Param(
|
||||
name: "can_restrict_members",
|
||||
ty: Option(bool),
|
||||
descr: Doc(md: "Pass True, if the administrator can restrict, ban or unban chat members")
|
||||
),
|
||||
Param(
|
||||
name: "can_pin_messages",
|
||||
ty: Option(bool),
|
||||
descr: Doc(md: "Pass True, if the administrator can pin messages, supergroups only")
|
||||
),
|
||||
Param(
|
||||
name: "can_promote_members",
|
||||
ty: Option(bool),
|
||||
descr: Doc(md: "Pass True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)")
|
||||
),
|
||||
Param(
|
||||
name: "can_change_info",
|
||||
ty: Option(bool),
|
||||
descr: Doc(md: "Pass True, if the administrator can change chat title, photo and other settings")
|
||||
),
|
||||
Param(
|
||||
name: "can_invite_users",
|
||||
ty: Option(bool),
|
||||
descr: Doc(md: "Pass True, if the administrator can invite new users to the chat")
|
||||
),
|
||||
Param(
|
||||
name: "can_pin_messages",
|
||||
ty: Option(bool),
|
||||
descr: Doc(md: "Pass True, if the administrator can pin messages, supergroups only")
|
||||
),
|
||||
Param(
|
||||
name: "can_manage_topics",
|
||||
ty: Option(bool),
|
||||
descr: Doc(md: "Pass True if the user is allowed to create, rename, close, and reopen forum topics, supergroups only")
|
||||
),
|
||||
],
|
||||
),
|
||||
Method(
|
||||
|
@ -2489,6 +2574,149 @@ Schema(
|
|||
),
|
||||
],
|
||||
),
|
||||
Method(
|
||||
names: ("getForumTopicIconStickers", "GetForumTopicIconStickers", "get_forum_topic_icon_stickers"),
|
||||
return_ty: ArrayOf(RawTy("Sticker")),
|
||||
doc: Doc(md: "Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of `Sticker` objects."),
|
||||
tg_doc: "https://core.telegram.org/bots/api#getforumtopiciconstickers",
|
||||
tg_category: "Available methods",
|
||||
params: [],
|
||||
),
|
||||
Method(
|
||||
names: ("createForumTopic", "CreateForumTopic", "create_forum_topic"),
|
||||
return_ty: RawTy("ForumTopic"),
|
||||
doc: Doc(md: "Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the _can\\_manage\\_topics_ administrator rights. Returns information about the created topic as a `ForumTopic` object."),
|
||||
tg_doc: "https://core.telegram.org/bots/api#createforumtopic",
|
||||
tg_category: "Available methods",
|
||||
params: [
|
||||
Param(
|
||||
name: "chat_id",
|
||||
ty: RawTy("Recipient"),
|
||||
descr: Doc(md: "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)")
|
||||
),
|
||||
Param(
|
||||
name: "name",
|
||||
ty: String,
|
||||
descr: Doc(md: "Topic name, 1-128 characters")
|
||||
),
|
||||
Param(
|
||||
name: "icon_color",
|
||||
// FIXME: use an Rgb or something
|
||||
ty: u32,
|
||||
descr: Doc(md: "Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F)")
|
||||
),
|
||||
Param(
|
||||
name: "icon_custom_emoji_id",
|
||||
ty: String,
|
||||
descr: Doc(md: "Unique identifier of the custom emoji shown as the topic icon. Use `getForumTopicIconStickers` to get all allowed custom emoji identifiers.")
|
||||
),
|
||||
],
|
||||
),
|
||||
Method(
|
||||
names: ("editForumTopic", "EditForumTopic", "edit_forum_topic"),
|
||||
return_ty: True,
|
||||
doc: Doc(md: "Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have _can\\_manage\\_topics_ administrator rights, unless it is the creator of the topic. Returns True on success."),
|
||||
tg_doc: "https://core.telegram.org/bots/api#editforumtopic",
|
||||
tg_category: "Available methods",
|
||||
params: [
|
||||
Param(
|
||||
name: "chat_id",
|
||||
ty: RawTy("Recipient"),
|
||||
descr: Doc(md: "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)")
|
||||
),
|
||||
Param(
|
||||
name: "message_thread_id",
|
||||
ty: i32,
|
||||
descr: Doc(md: "Unique identifier for the target message thread of the forum topic"),
|
||||
),
|
||||
Param(
|
||||
name: "name",
|
||||
ty: String,
|
||||
descr: Doc(md: "Topic name, 1-128 characters")
|
||||
),
|
||||
Param(
|
||||
name: "icon_custom_emoji_id",
|
||||
ty: String,
|
||||
descr: Doc(md: "Unique identifier of the custom emoji shown as the topic icon. Use `getForumTopicIconStickers` to get all allowed custom emoji identifiers.")
|
||||
),
|
||||
],
|
||||
),
|
||||
Method(
|
||||
names: ("closeForumTopic", "CloseForumTopic", "close_forum_topic"),
|
||||
return_ty: True,
|
||||
doc: Doc(md: "Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the _can\\_manage\\_topics_ administrator rights, unless it is the creator of the topic. Returns True on success."),
|
||||
tg_doc: "https://core.telegram.org/bots/api#closeforumtopic",
|
||||
tg_category: "Available methods",
|
||||
params: [
|
||||
Param(
|
||||
name: "chat_id",
|
||||
ty: RawTy("Recipient"),
|
||||
descr: Doc(md: "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)")
|
||||
),
|
||||
Param(
|
||||
name: "message_thread_id",
|
||||
ty: i32,
|
||||
descr: Doc(md: "Unique identifier for the target message thread of the forum topic"),
|
||||
),
|
||||
],
|
||||
),
|
||||
Method(
|
||||
names: ("reopenForumTopic", "ReopenForumTopic", "reopen_forum_topic"),
|
||||
return_ty: True,
|
||||
doc: Doc(md: "Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the _can\\_manage\\_topics_ administrator rights, unless it is the creator of the topic. Returns True on success."),
|
||||
tg_doc: "https://core.telegram.org/bots/api#reopenforumtopic",
|
||||
tg_category: "Available methods",
|
||||
params: [
|
||||
Param(
|
||||
name: "chat_id",
|
||||
ty: RawTy("Recipient"),
|
||||
descr: Doc(md: "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)")
|
||||
),
|
||||
Param(
|
||||
name: "message_thread_id",
|
||||
ty: i32,
|
||||
descr: Doc(md: "Unique identifier for the target message thread of the forum topic"),
|
||||
),
|
||||
],
|
||||
),
|
||||
Method(
|
||||
names: ("deleteForumTopic", "DeleteForumTopic", "delete_forum_topic"),
|
||||
return_ty: True,
|
||||
doc: Doc(md: "Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the _can\\_delete\\_messages_ administrator rights. Returns True on success."),
|
||||
tg_doc: "https://core.telegram.org/bots/api#deleteforumtopic",
|
||||
tg_category: "Available methods",
|
||||
params: [
|
||||
Param(
|
||||
name: "chat_id",
|
||||
ty: RawTy("Recipient"),
|
||||
descr: Doc(md: "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)")
|
||||
),
|
||||
Param(
|
||||
name: "message_thread_id",
|
||||
ty: i32,
|
||||
descr: Doc(md: "Unique identifier for the target message thread of the forum topic"),
|
||||
),
|
||||
],
|
||||
),
|
||||
Method(
|
||||
names: ("unpinAllForumTopicMessages", "UnpinAllForumTopicMessages", "unpin_all_forum_topic_messages"),
|
||||
return_ty: True,
|
||||
doc: Doc(md: "Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the _can\\_pin\\_messages_ administrator right in the supergroup. Returns True on success."),
|
||||
tg_doc: "https://core.telegram.org/bots/api#deleteforumtopic",
|
||||
tg_category: "Available methods",
|
||||
params: [
|
||||
Param(
|
||||
name: "chat_id",
|
||||
ty: RawTy("Recipient"),
|
||||
descr: Doc(md: "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)")
|
||||
),
|
||||
Param(
|
||||
name: "message_thread_id",
|
||||
ty: i32,
|
||||
descr: Doc(md: "Unique identifier for the target message thread of the forum topic"),
|
||||
),
|
||||
],
|
||||
),
|
||||
Method(
|
||||
names: ("answerCallbackQuery", "AnswerCallbackQuery", "answer_callback_query"),
|
||||
return_ty: True,
|
||||
|
@ -3106,6 +3334,11 @@ Schema(
|
|||
ty: RawTy("Recipient"),
|
||||
descr: Doc(md: "Unique identifier for the target chat or username of the target channel (in the format `@channelusername`).")
|
||||
),
|
||||
Param(
|
||||
name: "message_thread_id",
|
||||
ty: Option(i32),
|
||||
descr: Doc(md: "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"),
|
||||
),
|
||||
Param(
|
||||
name: "sticker",
|
||||
ty: RawTy("InputFile"),
|
||||
|
@ -3359,6 +3592,11 @@ Schema(
|
|||
ty: RawTy("Recipient"),
|
||||
descr: Doc(md: "Unique identifier for the target private chat"),
|
||||
),
|
||||
Param(
|
||||
name: "message_thread_id",
|
||||
ty: Option(i32),
|
||||
descr: Doc(md: "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"),
|
||||
),
|
||||
Param(
|
||||
name: "title",
|
||||
ty: String,
|
||||
|
@ -3711,6 +3949,11 @@ Schema(
|
|||
ty: u32,
|
||||
descr: Doc(md: "Unique identifier for the target chat"),
|
||||
),
|
||||
Param(
|
||||
name: "message_thread_id",
|
||||
ty: Option(i32),
|
||||
descr: Doc(md: "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"),
|
||||
),
|
||||
Param(
|
||||
name: "game_short_name",
|
||||
ty: String,
|
||||
|
|
|
@ -120,6 +120,13 @@ where
|
|||
get_chat_member,
|
||||
set_chat_sticker_set,
|
||||
delete_chat_sticker_set,
|
||||
get_forum_topic_icon_stickers,
|
||||
create_forum_topic,
|
||||
edit_forum_topic,
|
||||
close_forum_topic,
|
||||
reopen_forum_topic,
|
||||
delete_forum_topic,
|
||||
unpin_all_forum_topic_messages,
|
||||
answer_callback_query,
|
||||
set_my_commands,
|
||||
get_my_commands,
|
||||
|
|
|
@ -144,6 +144,13 @@ where
|
|||
get_chat_member,
|
||||
set_chat_sticker_set,
|
||||
delete_chat_sticker_set,
|
||||
get_forum_topic_icon_stickers,
|
||||
create_forum_topic,
|
||||
edit_forum_topic,
|
||||
close_forum_topic,
|
||||
reopen_forum_topic,
|
||||
delete_forum_topic,
|
||||
unpin_all_forum_topic_messages,
|
||||
answer_callback_query,
|
||||
set_my_commands,
|
||||
get_my_commands,
|
||||
|
|
|
@ -233,6 +233,13 @@ where
|
|||
get_chat_member,
|
||||
set_chat_sticker_set,
|
||||
delete_chat_sticker_set,
|
||||
get_forum_topic_icon_stickers,
|
||||
create_forum_topic,
|
||||
edit_forum_topic,
|
||||
close_forum_topic,
|
||||
reopen_forum_topic,
|
||||
delete_forum_topic,
|
||||
unpin_all_forum_topic_messages,
|
||||
answer_callback_query,
|
||||
set_my_commands,
|
||||
get_my_commands,
|
||||
|
@ -605,6 +612,50 @@ trait ErasableRequester<'a> {
|
|||
chat_id: Recipient,
|
||||
) -> ErasedRequest<'a, DeleteChatStickerSet, Self::Err>;
|
||||
|
||||
fn get_forum_topic_icon_stickers(
|
||||
&self,
|
||||
) -> ErasedRequest<'a, GetForumTopicIconStickers, Self::Err>;
|
||||
|
||||
fn create_forum_topic(
|
||||
&self,
|
||||
chat_id: Recipient,
|
||||
name: String,
|
||||
icon_color: u32,
|
||||
icon_custom_emoji_id: String,
|
||||
) -> ErasedRequest<'a, CreateForumTopic, Self::Err>;
|
||||
|
||||
fn edit_forum_topic(
|
||||
&self,
|
||||
chat_id: Recipient,
|
||||
message_thread_id: i32,
|
||||
name: String,
|
||||
icon_custom_emoji_id: String,
|
||||
) -> ErasedRequest<'a, EditForumTopic, Self::Err>;
|
||||
|
||||
fn close_forum_topic(
|
||||
&self,
|
||||
chat_id: Recipient,
|
||||
message_thread_id: i32,
|
||||
) -> ErasedRequest<'a, CloseForumTopic, Self::Err>;
|
||||
|
||||
fn reopen_forum_topic(
|
||||
&self,
|
||||
chat_id: Recipient,
|
||||
message_thread_id: i32,
|
||||
) -> ErasedRequest<'a, ReopenForumTopic, Self::Err>;
|
||||
|
||||
fn delete_forum_topic(
|
||||
&self,
|
||||
chat_id: Recipient,
|
||||
message_thread_id: i32,
|
||||
) -> ErasedRequest<'a, DeleteForumTopic, Self::Err>;
|
||||
|
||||
fn unpin_all_forum_topic_messages(
|
||||
&self,
|
||||
chat_id: Recipient,
|
||||
message_thread_id: i32,
|
||||
) -> ErasedRequest<'a, UnpinAllForumTopicMessages, Self::Err>;
|
||||
|
||||
fn answer_callback_query(
|
||||
&self,
|
||||
callback_query_id: String,
|
||||
|
@ -1279,6 +1330,65 @@ where
|
|||
Requester::delete_chat_sticker_set(self, chat_id).erase()
|
||||
}
|
||||
|
||||
fn get_forum_topic_icon_stickers(
|
||||
&self,
|
||||
) -> ErasedRequest<'a, GetForumTopicIconStickers, Self::Err> {
|
||||
Requester::get_forum_topic_icon_stickers(self).erase()
|
||||
}
|
||||
|
||||
fn create_forum_topic(
|
||||
&self,
|
||||
chat_id: Recipient,
|
||||
name: String,
|
||||
icon_color: u32,
|
||||
icon_custom_emoji_id: String,
|
||||
) -> ErasedRequest<'a, CreateForumTopic, Self::Err> {
|
||||
Requester::create_forum_topic(self, chat_id, name, icon_color, icon_custom_emoji_id).erase()
|
||||
}
|
||||
|
||||
fn edit_forum_topic(
|
||||
&self,
|
||||
chat_id: Recipient,
|
||||
message_thread_id: i32,
|
||||
name: String,
|
||||
icon_custom_emoji_id: String,
|
||||
) -> ErasedRequest<'a, EditForumTopic, Self::Err> {
|
||||
Requester::edit_forum_topic(self, chat_id, message_thread_id, name, icon_custom_emoji_id)
|
||||
.erase()
|
||||
}
|
||||
|
||||
fn close_forum_topic(
|
||||
&self,
|
||||
chat_id: Recipient,
|
||||
message_thread_id: i32,
|
||||
) -> ErasedRequest<'a, CloseForumTopic, Self::Err> {
|
||||
Requester::close_forum_topic(self, chat_id, message_thread_id).erase()
|
||||
}
|
||||
|
||||
fn reopen_forum_topic(
|
||||
&self,
|
||||
chat_id: Recipient,
|
||||
message_thread_id: i32,
|
||||
) -> ErasedRequest<'a, ReopenForumTopic, Self::Err> {
|
||||
Requester::reopen_forum_topic(self, chat_id, message_thread_id).erase()
|
||||
}
|
||||
|
||||
fn delete_forum_topic(
|
||||
&self,
|
||||
chat_id: Recipient,
|
||||
message_thread_id: i32,
|
||||
) -> ErasedRequest<'a, DeleteForumTopic, Self::Err> {
|
||||
Requester::delete_forum_topic(self, chat_id, message_thread_id).erase()
|
||||
}
|
||||
|
||||
fn unpin_all_forum_topic_messages(
|
||||
&self,
|
||||
chat_id: Recipient,
|
||||
message_thread_id: i32,
|
||||
) -> ErasedRequest<'a, UnpinAllForumTopicMessages, Self::Err> {
|
||||
Requester::unpin_all_forum_topic_messages(self, chat_id, message_thread_id).erase()
|
||||
}
|
||||
|
||||
fn answer_callback_query(
|
||||
&self,
|
||||
callback_query_id: String,
|
||||
|
|
|
@ -143,6 +143,13 @@ impl<B: Requester> Requester for DefaultParseMode<B> {
|
|||
get_chat_member,
|
||||
set_chat_sticker_set,
|
||||
delete_chat_sticker_set,
|
||||
get_forum_topic_icon_stickers,
|
||||
create_forum_topic,
|
||||
edit_forum_topic,
|
||||
close_forum_topic,
|
||||
reopen_forum_topic,
|
||||
delete_forum_topic,
|
||||
unpin_all_forum_topic_messages,
|
||||
answer_callback_query,
|
||||
set_my_commands,
|
||||
get_my_commands,
|
||||
|
|
|
@ -127,6 +127,13 @@ where
|
|||
get_chat_member,
|
||||
set_chat_sticker_set,
|
||||
delete_chat_sticker_set,
|
||||
get_forum_topic_icon_stickers,
|
||||
create_forum_topic,
|
||||
edit_forum_topic,
|
||||
close_forum_topic,
|
||||
reopen_forum_topic,
|
||||
delete_forum_topic,
|
||||
unpin_all_forum_topic_messages,
|
||||
answer_callback_query,
|
||||
set_my_commands,
|
||||
get_my_commands,
|
||||
|
|
|
@ -173,6 +173,13 @@ where
|
|||
get_chat_member,
|
||||
set_chat_sticker_set,
|
||||
delete_chat_sticker_set,
|
||||
get_forum_topic_icon_stickers,
|
||||
create_forum_topic,
|
||||
edit_forum_topic,
|
||||
close_forum_topic,
|
||||
reopen_forum_topic,
|
||||
delete_forum_topic,
|
||||
unpin_all_forum_topic_messages,
|
||||
answer_callback_query,
|
||||
set_my_commands,
|
||||
get_my_commands,
|
||||
|
|
|
@ -644,6 +644,107 @@ impl Requester for Bot {
|
|||
Self::DeleteChatStickerSet::new(self.clone(), payloads::DeleteChatStickerSet::new(chat_id))
|
||||
}
|
||||
|
||||
type GetForumTopicIconStickers = JsonRequest<payloads::GetForumTopicIconStickers>;
|
||||
|
||||
fn get_forum_topic_icon_stickers(&self) -> Self::GetForumTopicIconStickers {
|
||||
Self::GetForumTopicIconStickers::new(
|
||||
self.clone(),
|
||||
payloads::GetForumTopicIconStickers::new(),
|
||||
)
|
||||
}
|
||||
|
||||
type CreateForumTopic = JsonRequest<payloads::CreateForumTopic>;
|
||||
|
||||
fn create_forum_topic<C, N, I>(
|
||||
&self,
|
||||
chat_id: C,
|
||||
name: N,
|
||||
icon_color: u32,
|
||||
icon_custom_emoji_id: I,
|
||||
) -> Self::CreateForumTopic
|
||||
where
|
||||
C: Into<Recipient>,
|
||||
N: Into<String>,
|
||||
I: Into<String>,
|
||||
{
|
||||
Self::CreateForumTopic::new(
|
||||
self.clone(),
|
||||
payloads::CreateForumTopic::new(chat_id, name, icon_color, icon_custom_emoji_id),
|
||||
)
|
||||
}
|
||||
|
||||
type EditForumTopic = JsonRequest<payloads::EditForumTopic>;
|
||||
|
||||
fn edit_forum_topic<C, N, I>(
|
||||
&self,
|
||||
chat_id: C,
|
||||
message_thread_id: i32,
|
||||
name: N,
|
||||
icon_custom_emoji_id: I,
|
||||
) -> Self::EditForumTopic
|
||||
where
|
||||
C: Into<Recipient>,
|
||||
N: Into<String>,
|
||||
I: Into<String>,
|
||||
{
|
||||
Self::EditForumTopic::new(
|
||||
self.clone(),
|
||||
payloads::EditForumTopic::new(chat_id, message_thread_id, name, icon_custom_emoji_id),
|
||||
)
|
||||
}
|
||||
|
||||
type CloseForumTopic = JsonRequest<payloads::CloseForumTopic>;
|
||||
|
||||
fn close_forum_topic<C>(&self, chat_id: C, message_thread_id: i32) -> Self::CloseForumTopic
|
||||
where
|
||||
C: Into<Recipient>,
|
||||
{
|
||||
Self::CloseForumTopic::new(
|
||||
self.clone(),
|
||||
payloads::CloseForumTopic::new(chat_id, message_thread_id),
|
||||
)
|
||||
}
|
||||
|
||||
type ReopenForumTopic = JsonRequest<payloads::ReopenForumTopic>;
|
||||
|
||||
fn reopen_forum_topic<C>(&self, chat_id: C, message_thread_id: i32) -> Self::ReopenForumTopic
|
||||
where
|
||||
C: Into<Recipient>,
|
||||
{
|
||||
Self::ReopenForumTopic::new(
|
||||
self.clone(),
|
||||
payloads::ReopenForumTopic::new(chat_id, message_thread_id),
|
||||
)
|
||||
}
|
||||
|
||||
type DeleteForumTopic = JsonRequest<payloads::DeleteForumTopic>;
|
||||
|
||||
fn delete_forum_topic<C>(&self, chat_id: C, message_thread_id: i32) -> Self::DeleteForumTopic
|
||||
where
|
||||
C: Into<Recipient>,
|
||||
{
|
||||
Self::DeleteForumTopic::new(
|
||||
self.clone(),
|
||||
payloads::DeleteForumTopic::new(chat_id, message_thread_id),
|
||||
)
|
||||
}
|
||||
|
||||
type UnpinAllForumTopicMessages = JsonRequest<payloads::UnpinAllForumTopicMessages>;
|
||||
|
||||
fn unpin_all_forum_topic_messages<C>(
|
||||
&self,
|
||||
chat_id: C,
|
||||
message_thread_id: i32,
|
||||
) -> Self::UnpinAllForumTopicMessages
|
||||
where
|
||||
C: Into<Recipient>,
|
||||
{
|
||||
Self::UnpinAllForumTopicMessages::new(
|
||||
self.clone(),
|
||||
payloads::UnpinAllForumTopicMessages::new(chat_id, message_thread_id),
|
||||
)
|
||||
}
|
||||
|
||||
type AnswerCallbackQuery = JsonRequest<payloads::AnswerCallbackQuery>;
|
||||
|
||||
fn answer_callback_query<C>(&self, callback_query_id: C) -> Self::AnswerCallbackQuery
|
||||
|
|
|
@ -908,6 +908,66 @@ macro_rules! requester_forward {
|
|||
$body!(delete_chat_sticker_set this (chat_id: C))
|
||||
}
|
||||
};
|
||||
(@method get_forum_topic_icon_stickers $body:ident $ty:ident) => {
|
||||
type GetForumTopicIconStickers = $ty![GetForumTopicIconStickers];
|
||||
|
||||
fn get_forum_topic_icon_stickers(&self, ) -> Self::GetForumTopicIconStickers {
|
||||
let this = self;
|
||||
$body!(get_forum_topic_icon_stickers this ())
|
||||
}
|
||||
};
|
||||
(@method create_forum_topic $body:ident $ty:ident) => {
|
||||
type CreateForumTopic = $ty![CreateForumTopic];
|
||||
|
||||
fn create_forum_topic<C, N, I>(&self, chat_id: C, name: N, icon_color: u32, icon_custom_emoji_id: I) -> Self::CreateForumTopic where C: Into<Recipient>,
|
||||
N: Into<String>,
|
||||
I: Into<String> {
|
||||
let this = self;
|
||||
$body!(create_forum_topic this (chat_id: C, name: N, icon_color: u32, icon_custom_emoji_id: I))
|
||||
}
|
||||
};
|
||||
(@method edit_forum_topic $body:ident $ty:ident) => {
|
||||
type EditForumTopic = $ty![EditForumTopic];
|
||||
|
||||
fn edit_forum_topic<C, N, I>(&self, chat_id: C, message_thread_id: i32, name: N, icon_custom_emoji_id: I) -> Self::EditForumTopic where C: Into<Recipient>,
|
||||
N: Into<String>,
|
||||
I: Into<String> {
|
||||
let this = self;
|
||||
$body!(edit_forum_topic this (chat_id: C, message_thread_id: i32, name: N, icon_custom_emoji_id: I))
|
||||
}
|
||||
};
|
||||
(@method close_forum_topic $body:ident $ty:ident) => {
|
||||
type CloseForumTopic = $ty![CloseForumTopic];
|
||||
|
||||
fn close_forum_topic<C>(&self, chat_id: C, message_thread_id: i32) -> Self::CloseForumTopic where C: Into<Recipient> {
|
||||
let this = self;
|
||||
$body!(close_forum_topic this (chat_id: C, message_thread_id: i32))
|
||||
}
|
||||
};
|
||||
(@method reopen_forum_topic $body:ident $ty:ident) => {
|
||||
type ReopenForumTopic = $ty![ReopenForumTopic];
|
||||
|
||||
fn reopen_forum_topic<C>(&self, chat_id: C, message_thread_id: i32) -> Self::ReopenForumTopic where C: Into<Recipient> {
|
||||
let this = self;
|
||||
$body!(reopen_forum_topic this (chat_id: C, message_thread_id: i32))
|
||||
}
|
||||
};
|
||||
(@method delete_forum_topic $body:ident $ty:ident) => {
|
||||
type DeleteForumTopic = $ty![DeleteForumTopic];
|
||||
|
||||
fn delete_forum_topic<C>(&self, chat_id: C, message_thread_id: i32) -> Self::DeleteForumTopic where C: Into<Recipient> {
|
||||
let this = self;
|
||||
$body!(delete_forum_topic this (chat_id: C, message_thread_id: i32))
|
||||
}
|
||||
};
|
||||
(@method unpin_all_forum_topic_messages $body:ident $ty:ident) => {
|
||||
type UnpinAllForumTopicMessages = $ty![UnpinAllForumTopicMessages];
|
||||
|
||||
fn unpin_all_forum_topic_messages<C>(&self, chat_id: C, message_thread_id: i32) -> Self::UnpinAllForumTopicMessages where C: Into<Recipient> {
|
||||
let this = self;
|
||||
$body!(unpin_all_forum_topic_messages this (chat_id: C, message_thread_id: i32))
|
||||
}
|
||||
};
|
||||
(@method answer_callback_query $body:ident $ty:ident) => {
|
||||
type AnswerCallbackQuery = $ty![AnswerCallbackQuery];
|
||||
|
||||
|
|
|
@ -25,18 +25,22 @@ mod approve_chat_join_request;
|
|||
mod ban_chat_member;
|
||||
mod ban_chat_sender_chat;
|
||||
mod close;
|
||||
mod close_forum_topic;
|
||||
mod copy_message;
|
||||
mod create_chat_invite_link;
|
||||
mod create_forum_topic;
|
||||
mod create_invoice_link;
|
||||
mod create_new_sticker_set;
|
||||
mod decline_chat_join_request;
|
||||
mod delete_chat_photo;
|
||||
mod delete_chat_sticker_set;
|
||||
mod delete_forum_topic;
|
||||
mod delete_message;
|
||||
mod delete_my_commands;
|
||||
mod delete_sticker_from_set;
|
||||
mod delete_webhook;
|
||||
mod edit_chat_invite_link;
|
||||
mod edit_forum_topic;
|
||||
mod edit_message_caption;
|
||||
mod edit_message_caption_inline;
|
||||
mod edit_message_live_location;
|
||||
|
@ -57,6 +61,7 @@ mod get_chat_members_count;
|
|||
mod get_chat_menu_button;
|
||||
mod get_custom_emoji_stickers;
|
||||
mod get_file;
|
||||
mod get_forum_topic_icon_stickers;
|
||||
mod get_game_high_scores;
|
||||
mod get_me;
|
||||
mod get_my_commands;
|
||||
|
@ -70,6 +75,7 @@ mod leave_chat;
|
|||
mod log_out;
|
||||
mod pin_chat_message;
|
||||
mod promote_chat_member;
|
||||
mod reopen_forum_topic;
|
||||
mod restrict_chat_member;
|
||||
mod revoke_chat_invite_link;
|
||||
mod send_animation;
|
||||
|
@ -111,6 +117,7 @@ mod stop_poll;
|
|||
mod unban_chat_member;
|
||||
mod unban_chat_sender_chat;
|
||||
mod unpin_all_chat_messages;
|
||||
mod unpin_all_forum_topic_messages;
|
||||
mod unpin_chat_message;
|
||||
mod upload_sticker_file;
|
||||
|
||||
|
@ -124,18 +131,22 @@ pub use approve_chat_join_request::{ApproveChatJoinRequest, ApproveChatJoinReque
|
|||
pub use ban_chat_member::{BanChatMember, BanChatMemberSetters};
|
||||
pub use ban_chat_sender_chat::{BanChatSenderChat, BanChatSenderChatSetters};
|
||||
pub use close::{Close, CloseSetters};
|
||||
pub use close_forum_topic::{CloseForumTopic, CloseForumTopicSetters};
|
||||
pub use copy_message::{CopyMessage, CopyMessageSetters};
|
||||
pub use create_chat_invite_link::{CreateChatInviteLink, CreateChatInviteLinkSetters};
|
||||
pub use create_forum_topic::{CreateForumTopic, CreateForumTopicSetters};
|
||||
pub use create_invoice_link::{CreateInvoiceLink, CreateInvoiceLinkSetters};
|
||||
pub use create_new_sticker_set::{CreateNewStickerSet, CreateNewStickerSetSetters};
|
||||
pub use decline_chat_join_request::{DeclineChatJoinRequest, DeclineChatJoinRequestSetters};
|
||||
pub use delete_chat_photo::{DeleteChatPhoto, DeleteChatPhotoSetters};
|
||||
pub use delete_chat_sticker_set::{DeleteChatStickerSet, DeleteChatStickerSetSetters};
|
||||
pub use delete_forum_topic::{DeleteForumTopic, DeleteForumTopicSetters};
|
||||
pub use delete_message::{DeleteMessage, DeleteMessageSetters};
|
||||
pub use delete_my_commands::{DeleteMyCommands, DeleteMyCommandsSetters};
|
||||
pub use delete_sticker_from_set::{DeleteStickerFromSet, DeleteStickerFromSetSetters};
|
||||
pub use delete_webhook::{DeleteWebhook, DeleteWebhookSetters};
|
||||
pub use edit_chat_invite_link::{EditChatInviteLink, EditChatInviteLinkSetters};
|
||||
pub use edit_forum_topic::{EditForumTopic, EditForumTopicSetters};
|
||||
pub use edit_message_caption::{EditMessageCaption, EditMessageCaptionSetters};
|
||||
pub use edit_message_caption_inline::{EditMessageCaptionInline, EditMessageCaptionInlineSetters};
|
||||
pub use edit_message_live_location::{EditMessageLiveLocation, EditMessageLiveLocationSetters};
|
||||
|
@ -160,6 +171,9 @@ pub use get_chat_members_count::{GetChatMembersCount, GetChatMembersCountSetters
|
|||
pub use get_chat_menu_button::{GetChatMenuButton, GetChatMenuButtonSetters};
|
||||
pub use get_custom_emoji_stickers::{GetCustomEmojiStickers, GetCustomEmojiStickersSetters};
|
||||
pub use get_file::{GetFile, GetFileSetters};
|
||||
pub use get_forum_topic_icon_stickers::{
|
||||
GetForumTopicIconStickers, GetForumTopicIconStickersSetters,
|
||||
};
|
||||
pub use get_game_high_scores::{GetGameHighScores, GetGameHighScoresSetters};
|
||||
pub use get_me::{GetMe, GetMeSetters};
|
||||
pub use get_my_commands::{GetMyCommands, GetMyCommandsSetters};
|
||||
|
@ -175,6 +189,7 @@ pub use leave_chat::{LeaveChat, LeaveChatSetters};
|
|||
pub use log_out::{LogOut, LogOutSetters};
|
||||
pub use pin_chat_message::{PinChatMessage, PinChatMessageSetters};
|
||||
pub use promote_chat_member::{PromoteChatMember, PromoteChatMemberSetters};
|
||||
pub use reopen_forum_topic::{ReopenForumTopic, ReopenForumTopicSetters};
|
||||
pub use restrict_chat_member::{RestrictChatMember, RestrictChatMemberSetters};
|
||||
pub use revoke_chat_invite_link::{RevokeChatInviteLink, RevokeChatInviteLinkSetters};
|
||||
pub use send_animation::{SendAnimation, SendAnimationSetters};
|
||||
|
@ -222,6 +237,9 @@ pub use stop_poll::{StopPoll, StopPollSetters};
|
|||
pub use unban_chat_member::{UnbanChatMember, UnbanChatMemberSetters};
|
||||
pub use unban_chat_sender_chat::{UnbanChatSenderChat, UnbanChatSenderChatSetters};
|
||||
pub use unpin_all_chat_messages::{UnpinAllChatMessages, UnpinAllChatMessagesSetters};
|
||||
pub use unpin_all_forum_topic_messages::{
|
||||
UnpinAllForumTopicMessages, UnpinAllForumTopicMessagesSetters,
|
||||
};
|
||||
pub use unpin_chat_message::{UnpinChatMessage, UnpinChatMessageSetters};
|
||||
pub use upload_sticker_file::{UploadStickerFile, UploadStickerFileSetters};
|
||||
// END BLOCK payload_modules
|
||||
|
|
18
crates/teloxide-core/src/payloads/close_forum_topic.rs
Normal file
18
crates/teloxide-core/src/payloads/close_forum_topic.rs
Normal file
|
@ -0,0 +1,18 @@
|
|||
//! Generated by `codegen_payloads`, do not edit by hand.
|
||||
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::types::{Recipient, True};
|
||||
|
||||
impl_payload! {
|
||||
/// Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the _can\_manage\_topics_ administrator rights, unless it is the creator of the topic. Returns True on success.
|
||||
#[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
|
||||
pub CloseForumTopic (CloseForumTopicSetters) => True {
|
||||
required {
|
||||
/// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
|
||||
pub chat_id: Recipient [into],
|
||||
/// Unique identifier for the target message thread of the forum topic
|
||||
pub message_thread_id: i32,
|
||||
}
|
||||
}
|
||||
}
|
|
@ -20,6 +20,8 @@ impl_payload! {
|
|||
pub message_id: MessageId,
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: i32,
|
||||
/// New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept
|
||||
pub caption: String [into],
|
||||
/// Mode for parsing entities in the photo caption. See [formatting options] for more details.
|
||||
|
|
22
crates/teloxide-core/src/payloads/create_forum_topic.rs
Normal file
22
crates/teloxide-core/src/payloads/create_forum_topic.rs
Normal file
|
@ -0,0 +1,22 @@
|
|||
//! Generated by `codegen_payloads`, do not edit by hand.
|
||||
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::types::{ForumTopic, Recipient};
|
||||
|
||||
impl_payload! {
|
||||
/// Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the _can\_manage\_topics_ administrator rights. Returns information about the created topic as a `ForumTopic` object.
|
||||
#[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
|
||||
pub CreateForumTopic (CreateForumTopicSetters) => ForumTopic {
|
||||
required {
|
||||
/// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
|
||||
pub chat_id: Recipient [into],
|
||||
/// Topic name, 1-128 characters
|
||||
pub name: String [into],
|
||||
/// Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F)
|
||||
pub icon_color: u32,
|
||||
/// Unique identifier of the custom emoji shown as the topic icon. Use `getForumTopicIconStickers` to get all allowed custom emoji identifiers.
|
||||
pub icon_custom_emoji_id: String [into],
|
||||
}
|
||||
}
|
||||
}
|
18
crates/teloxide-core/src/payloads/delete_forum_topic.rs
Normal file
18
crates/teloxide-core/src/payloads/delete_forum_topic.rs
Normal file
|
@ -0,0 +1,18 @@
|
|||
//! Generated by `codegen_payloads`, do not edit by hand.
|
||||
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::types::{Recipient, True};
|
||||
|
||||
impl_payload! {
|
||||
/// Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the _can\_delete\_messages_ administrator rights. Returns True on success.
|
||||
#[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
|
||||
pub DeleteForumTopic (DeleteForumTopicSetters) => True {
|
||||
required {
|
||||
/// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
|
||||
pub chat_id: Recipient [into],
|
||||
/// Unique identifier for the target message thread of the forum topic
|
||||
pub message_thread_id: i32,
|
||||
}
|
||||
}
|
||||
}
|
22
crates/teloxide-core/src/payloads/edit_forum_topic.rs
Normal file
22
crates/teloxide-core/src/payloads/edit_forum_topic.rs
Normal file
|
@ -0,0 +1,22 @@
|
|||
//! Generated by `codegen_payloads`, do not edit by hand.
|
||||
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::types::{Recipient, True};
|
||||
|
||||
impl_payload! {
|
||||
/// Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have _can\_manage\_topics_ administrator rights, unless it is the creator of the topic. Returns True on success.
|
||||
#[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
|
||||
pub EditForumTopic (EditForumTopicSetters) => True {
|
||||
required {
|
||||
/// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
|
||||
pub chat_id: Recipient [into],
|
||||
/// Unique identifier for the target message thread of the forum topic
|
||||
pub message_thread_id: i32,
|
||||
/// Topic name, 1-128 characters
|
||||
pub name: String [into],
|
||||
/// Unique identifier of the custom emoji shown as the topic icon. Use `getForumTopicIconStickers` to get all allowed custom emoji identifiers.
|
||||
pub icon_custom_emoji_id: String [into],
|
||||
}
|
||||
}
|
||||
}
|
|
@ -20,6 +20,8 @@ impl_payload! {
|
|||
pub message_id: MessageId,
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: i32,
|
||||
/// Sends the message [silently]. Users will receive a notification with no sound.
|
||||
///
|
||||
/// [silently]: https://telegram.org/blog/channels-2-0#silent-messages
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
//! Generated by `codegen_payloads`, do not edit by hand.
|
||||
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::types::Sticker;
|
||||
|
||||
impl_payload! {
|
||||
/// Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of `Sticker` objects.
|
||||
#[derive(Debug, PartialEq, Eq, Hash, Default, Clone, Serialize)]
|
||||
pub GetForumTopicIconStickers (GetForumTopicIconStickersSetters) => Vec<Sticker> {
|
||||
|
||||
}
|
||||
}
|
|
@ -19,8 +19,6 @@ impl_payload! {
|
|||
pub is_anonymous: bool,
|
||||
/// Pass True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege
|
||||
pub can_manage_chat: bool,
|
||||
/// Pass True, if the administrator can change chat title, photo and other settings
|
||||
pub can_change_info: bool,
|
||||
/// Pass True, if the administrator can create channel posts, channels only
|
||||
pub can_post_messages: bool,
|
||||
/// Pass True, if the administrator can edit messages of other users and can pin messages, channels only
|
||||
|
@ -29,14 +27,18 @@ impl_payload! {
|
|||
pub can_delete_messages: bool,
|
||||
/// Pass True, if the administrator can manage video chats, supergroups only
|
||||
pub can_manage_video_chats: bool,
|
||||
/// Pass True, if the administrator can invite new users to the chat
|
||||
pub can_invite_users: bool,
|
||||
/// Pass True, if the administrator can restrict, ban or unban chat members
|
||||
pub can_restrict_members: bool,
|
||||
/// Pass True, if the administrator can pin messages, supergroups only
|
||||
pub can_pin_messages: bool,
|
||||
/// Pass True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)
|
||||
pub can_promote_members: bool,
|
||||
/// Pass True, if the administrator can change chat title, photo and other settings
|
||||
pub can_change_info: bool,
|
||||
/// Pass True, if the administrator can invite new users to the chat
|
||||
pub can_invite_users: bool,
|
||||
/// Pass True, if the administrator can pin messages, supergroups only
|
||||
pub can_pin_messages: bool,
|
||||
/// Pass True if the user is allowed to create, rename, close, and reopen forum topics, supergroups only
|
||||
pub can_manage_topics: bool,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
18
crates/teloxide-core/src/payloads/reopen_forum_topic.rs
Normal file
18
crates/teloxide-core/src/payloads/reopen_forum_topic.rs
Normal file
|
@ -0,0 +1,18 @@
|
|||
//! Generated by `codegen_payloads`, do not edit by hand.
|
||||
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::types::{Recipient, True};
|
||||
|
||||
impl_payload! {
|
||||
/// Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the _can\_manage\_topics_ administrator rights, unless it is the creator of the topic. Returns True on success.
|
||||
#[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
|
||||
pub ReopenForumTopic (ReopenForumTopicSetters) => True {
|
||||
required {
|
||||
/// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
|
||||
pub chat_id: Recipient [into],
|
||||
/// Unique identifier for the target message thread of the forum topic
|
||||
pub message_thread_id: i32,
|
||||
}
|
||||
}
|
||||
}
|
|
@ -22,6 +22,8 @@ impl_payload! {
|
|||
pub animation: InputFile,
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: i32,
|
||||
/// Duration of the animation in seconds
|
||||
pub duration: u32,
|
||||
/// Animation width
|
||||
|
|
|
@ -25,6 +25,8 @@ impl_payload! {
|
|||
pub audio: InputFile,
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: i32,
|
||||
/// Audio caption, 0-1024 characters after entities parsing
|
||||
pub caption: String [into],
|
||||
/// Mode for parsing entities in the audio caption. See [formatting options] for more details.
|
||||
|
|
|
@ -19,6 +19,8 @@ impl_payload! {
|
|||
pub first_name: String [into],
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: i32,
|
||||
/// Contact's last name
|
||||
pub last_name: String [into],
|
||||
/// Additional data about the contact in the form of a [vCard], 0-2048 bytes
|
||||
|
|
|
@ -15,6 +15,8 @@ impl_payload! {
|
|||
pub chat_id: Recipient [into],
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: i32,
|
||||
/// Emoji on which the dice throw animation is based. Currently, must be one of “🎲”, “🎯”, “🏀”, “⚽”, “🎳”, or “🎰”. Dice can have values 1-6 for “🎲”, “🎯” and “🎳”, values 1-5 for “🏀” and “⚽”, and values 1-64 for “🎰”. Defaults to “🎲”
|
||||
pub emoji: DiceEmoji,
|
||||
/// Sends the message [silently]. Users will receive a notification with no sound.
|
||||
|
|
|
@ -22,6 +22,8 @@ impl_payload! {
|
|||
pub document: InputFile,
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: i32,
|
||||
/// Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. [More info on Sending Files »]
|
||||
///
|
||||
/// [More info on Sending Files »]: crate::types::InputFile
|
||||
|
|
|
@ -17,6 +17,8 @@ impl_payload! {
|
|||
pub game_short_name: String [into],
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: i32,
|
||||
/// Sends the message [silently]. Users will receive a notification with no sound.
|
||||
///
|
||||
/// [silently]: https://telegram.org/blog/channels-2-0#silent-messages
|
||||
|
|
|
@ -30,6 +30,8 @@ impl_payload! {
|
|||
pub prices: Vec<LabeledPrice> [collect],
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: i32,
|
||||
/// The maximum accepted amount for tips in the smallest units of the currency (integer, **not** float/double). For example, for a maximum tip of `US$ 1.45` pass `max_tip_amount = 145`. See the exp parameter in [`currencies.json`], it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0
|
||||
///
|
||||
/// [`currencies.json`]: https://core.telegram.org/bots/payments/currencies.json
|
||||
|
|
|
@ -19,6 +19,8 @@ impl_payload! {
|
|||
pub longitude: f64,
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: i32,
|
||||
/// The radius of uncertainty for the location, measured in meters; 0-1500
|
||||
pub horizontal_accuracy: f64,
|
||||
/// Period in seconds for which the location will be updated (see [Live Locations], should be between 60 and 86400.
|
||||
|
|
|
@ -17,6 +17,8 @@ impl_payload! {
|
|||
pub media: Vec<InputMedia> [collect],
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: i32,
|
||||
/// Sends the message [silently]. Users will receive a notification with no sound.
|
||||
///
|
||||
/// [silently]: https://telegram.org/blog/channels-2-0#silent-messages
|
||||
|
|
|
@ -17,6 +17,8 @@ impl_payload! {
|
|||
pub text: String [into],
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: i32,
|
||||
/// Mode for parsing entities in the message text. See [formatting options] for more details.
|
||||
///
|
||||
/// [formatting options]: https://core.telegram.org/bots/api#formatting-options
|
||||
|
|
|
@ -22,6 +22,8 @@ impl_payload! {
|
|||
pub photo: InputFile,
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: i32,
|
||||
/// Photo caption (may also be used when resending photos by _file\_id_), 0-1024 characters after entities parsing
|
||||
pub caption: String [into],
|
||||
/// Mode for parsing entities in the photo caption. See [formatting options] for more details.
|
||||
|
|
|
@ -22,6 +22,8 @@ impl_payload! {
|
|||
pub options: Vec<String> [collect],
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: i32,
|
||||
/// True, if the poll needs to be anonymous, defaults to True
|
||||
pub is_anonymous: bool,
|
||||
/// Poll type, “quiz” or “regular”, defaults to “regular”
|
||||
|
|
|
@ -20,6 +20,8 @@ impl_payload! {
|
|||
pub sticker: InputFile,
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: i32,
|
||||
/// Sends the message [silently]. Users will receive a notification with no sound.
|
||||
///
|
||||
/// [silently]: https://telegram.org/blog/channels-2-0#silent-messages
|
||||
|
|
|
@ -23,6 +23,8 @@ impl_payload! {
|
|||
pub address: String [into],
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: i32,
|
||||
/// Foursquare identifier of the venue
|
||||
pub foursquare_id: String [into],
|
||||
/// Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
|
||||
|
|
|
@ -23,6 +23,8 @@ impl_payload! {
|
|||
pub video: InputFile,
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: i32,
|
||||
/// Duration of the video in seconds
|
||||
pub duration: u32,
|
||||
/// Video width
|
||||
|
|
|
@ -21,6 +21,8 @@ impl_payload! {
|
|||
pub video_note: InputFile,
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: i32,
|
||||
/// Duration of the video in seconds
|
||||
pub duration: u32,
|
||||
/// Video width and height, i.e. diameter of the video message
|
||||
|
|
|
@ -24,6 +24,8 @@ impl_payload! {
|
|||
pub voice: InputFile,
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: i32,
|
||||
/// Voice message caption, 0-1024 characters after entities parsing
|
||||
pub caption: String [into],
|
||||
/// Mode for parsing entities in the voice message caption. See [formatting options] for more details.
|
||||
|
|
|
@ -5,27 +5,30 @@ pub use crate::payloads::{
|
|||
AddStickerToSetSetters as _, AnswerCallbackQuerySetters as _, AnswerInlineQuerySetters as _,
|
||||
AnswerPreCheckoutQuerySetters as _, AnswerShippingQuerySetters as _,
|
||||
AnswerWebAppQuerySetters as _, ApproveChatJoinRequestSetters as _, BanChatMemberSetters as _,
|
||||
BanChatSenderChatSetters as _, CloseSetters as _, CopyMessageSetters as _,
|
||||
CreateChatInviteLinkSetters as _, CreateInvoiceLinkSetters as _,
|
||||
CreateNewStickerSetSetters as _, DeclineChatJoinRequestSetters as _,
|
||||
DeleteChatPhotoSetters as _, DeleteChatStickerSetSetters as _, DeleteMessageSetters as _,
|
||||
BanChatSenderChatSetters as _, CloseForumTopicSetters as _, CloseSetters as _,
|
||||
CopyMessageSetters as _, CreateChatInviteLinkSetters as _, CreateForumTopicSetters as _,
|
||||
CreateInvoiceLinkSetters as _, CreateNewStickerSetSetters as _,
|
||||
DeclineChatJoinRequestSetters as _, DeleteChatPhotoSetters as _,
|
||||
DeleteChatStickerSetSetters as _, DeleteForumTopicSetters as _, DeleteMessageSetters as _,
|
||||
DeleteMyCommandsSetters as _, DeleteStickerFromSetSetters as _, DeleteWebhookSetters as _,
|
||||
EditChatInviteLinkSetters as _, EditMessageCaptionInlineSetters as _,
|
||||
EditMessageCaptionSetters as _, EditMessageLiveLocationInlineSetters as _,
|
||||
EditMessageLiveLocationSetters as _, EditMessageMediaInlineSetters as _,
|
||||
EditMessageMediaSetters as _, EditMessageReplyMarkupInlineSetters as _,
|
||||
EditMessageReplyMarkupSetters as _, EditMessageTextInlineSetters as _,
|
||||
EditMessageTextSetters as _, ExportChatInviteLinkSetters as _, ForwardMessageSetters as _,
|
||||
EditChatInviteLinkSetters as _, EditForumTopicSetters as _,
|
||||
EditMessageCaptionInlineSetters as _, EditMessageCaptionSetters as _,
|
||||
EditMessageLiveLocationInlineSetters as _, EditMessageLiveLocationSetters as _,
|
||||
EditMessageMediaInlineSetters as _, EditMessageMediaSetters as _,
|
||||
EditMessageReplyMarkupInlineSetters as _, EditMessageReplyMarkupSetters as _,
|
||||
EditMessageTextInlineSetters as _, EditMessageTextSetters as _,
|
||||
ExportChatInviteLinkSetters as _, ForwardMessageSetters as _,
|
||||
GetChatAdministratorsSetters as _, GetChatMemberCountSetters as _, GetChatMemberSetters as _,
|
||||
GetChatMembersCountSetters as _, GetChatMenuButtonSetters as _, GetChatSetters as _,
|
||||
GetCustomEmojiStickersSetters as _, GetFileSetters as _, GetGameHighScoresSetters as _,
|
||||
GetMeSetters as _, GetMyCommandsSetters as _, GetMyDefaultAdministratorRightsSetters as _,
|
||||
GetStickerSetSetters as _, GetUpdatesSetters as _, GetUserProfilePhotosSetters as _,
|
||||
GetWebhookInfoSetters as _, KickChatMemberSetters as _, LeaveChatSetters as _,
|
||||
LogOutSetters as _, PinChatMessageSetters as _, PromoteChatMemberSetters as _,
|
||||
RestrictChatMemberSetters as _, RevokeChatInviteLinkSetters as _, SendAnimationSetters as _,
|
||||
SendAudioSetters as _, SendChatActionSetters as _, SendContactSetters as _,
|
||||
SendDiceSetters as _, SendDocumentSetters as _, SendGameSetters as _, SendInvoiceSetters as _,
|
||||
GetCustomEmojiStickersSetters as _, GetFileSetters as _, GetForumTopicIconStickersSetters as _,
|
||||
GetGameHighScoresSetters as _, GetMeSetters as _, GetMyCommandsSetters as _,
|
||||
GetMyDefaultAdministratorRightsSetters as _, GetStickerSetSetters as _, GetUpdatesSetters as _,
|
||||
GetUserProfilePhotosSetters as _, GetWebhookInfoSetters as _, KickChatMemberSetters as _,
|
||||
LeaveChatSetters as _, LogOutSetters as _, PinChatMessageSetters as _,
|
||||
PromoteChatMemberSetters as _, ReopenForumTopicSetters as _, RestrictChatMemberSetters as _,
|
||||
RevokeChatInviteLinkSetters as _, SendAnimationSetters as _, SendAudioSetters as _,
|
||||
SendChatActionSetters as _, SendContactSetters as _, SendDiceSetters as _,
|
||||
SendDocumentSetters as _, SendGameSetters as _, SendInvoiceSetters as _,
|
||||
SendLocationSetters as _, SendMediaGroupSetters as _, SendMessageSetters as _,
|
||||
SendPhotoSetters as _, SendPollSetters as _, SendStickerSetters as _, SendVenueSetters as _,
|
||||
SendVideoNoteSetters as _, SendVideoSetters as _, SendVoiceSetters as _,
|
||||
|
@ -37,5 +40,6 @@ pub use crate::payloads::{
|
|||
SetStickerPositionInSetSetters as _, SetStickerSetThumbSetters as _, SetWebhookSetters as _,
|
||||
StopMessageLiveLocationInlineSetters as _, StopMessageLiveLocationSetters as _,
|
||||
StopPollSetters as _, UnbanChatMemberSetters as _, UnbanChatSenderChatSetters as _,
|
||||
UnpinAllChatMessagesSetters as _, UnpinChatMessageSetters as _, UploadStickerFileSetters as _,
|
||||
UnpinAllChatMessagesSetters as _, UnpinAllForumTopicMessagesSetters as _,
|
||||
UnpinChatMessageSetters as _, UploadStickerFileSetters as _,
|
||||
};
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
//! Generated by `codegen_payloads`, do not edit by hand.
|
||||
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::types::{Recipient, True};
|
||||
|
||||
impl_payload! {
|
||||
/// Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the _can\_pin\_messages_ administrator right in the supergroup. Returns True on success.
|
||||
#[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
|
||||
pub UnpinAllForumTopicMessages (UnpinAllForumTopicMessagesSetters) => True {
|
||||
required {
|
||||
/// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
|
||||
pub chat_id: Recipient [into],
|
||||
/// Unique identifier for the target message thread of the forum topic
|
||||
pub message_thread_id: i32,
|
||||
}
|
||||
}
|
||||
}
|
|
@ -659,6 +659,73 @@ pub trait Requester {
|
|||
where
|
||||
C: Into<Recipient>;
|
||||
|
||||
type GetForumTopicIconStickers: Request<Payload = GetForumTopicIconStickers, Err = Self::Err>;
|
||||
|
||||
/// For Telegram documentation see [`GetForumTopicIconStickers`].
|
||||
fn get_forum_topic_icon_stickers(&self) -> Self::GetForumTopicIconStickers;
|
||||
|
||||
type CreateForumTopic: Request<Payload = CreateForumTopic, Err = Self::Err>;
|
||||
|
||||
/// For Telegram documentation see [`CreateForumTopic`].
|
||||
fn create_forum_topic<C, N, I>(
|
||||
&self,
|
||||
chat_id: C,
|
||||
name: N,
|
||||
icon_color: u32,
|
||||
icon_custom_emoji_id: I,
|
||||
) -> Self::CreateForumTopic
|
||||
where
|
||||
C: Into<Recipient>,
|
||||
N: Into<String>,
|
||||
I: Into<String>;
|
||||
|
||||
type EditForumTopic: Request<Payload = EditForumTopic, Err = Self::Err>;
|
||||
|
||||
/// For Telegram documentation see [`EditForumTopic`].
|
||||
fn edit_forum_topic<C, N, I>(
|
||||
&self,
|
||||
chat_id: C,
|
||||
message_thread_id: i32,
|
||||
name: N,
|
||||
icon_custom_emoji_id: I,
|
||||
) -> Self::EditForumTopic
|
||||
where
|
||||
C: Into<Recipient>,
|
||||
N: Into<String>,
|
||||
I: Into<String>;
|
||||
|
||||
type CloseForumTopic: Request<Payload = CloseForumTopic, Err = Self::Err>;
|
||||
|
||||
/// For Telegram documentation see [`CloseForumTopic`].
|
||||
fn close_forum_topic<C>(&self, chat_id: C, message_thread_id: i32) -> Self::CloseForumTopic
|
||||
where
|
||||
C: Into<Recipient>;
|
||||
|
||||
type ReopenForumTopic: Request<Payload = ReopenForumTopic, Err = Self::Err>;
|
||||
|
||||
/// For Telegram documentation see [`ReopenForumTopic`].
|
||||
fn reopen_forum_topic<C>(&self, chat_id: C, message_thread_id: i32) -> Self::ReopenForumTopic
|
||||
where
|
||||
C: Into<Recipient>;
|
||||
|
||||
type DeleteForumTopic: Request<Payload = DeleteForumTopic, Err = Self::Err>;
|
||||
|
||||
/// For Telegram documentation see [`DeleteForumTopic`].
|
||||
fn delete_forum_topic<C>(&self, chat_id: C, message_thread_id: i32) -> Self::DeleteForumTopic
|
||||
where
|
||||
C: Into<Recipient>;
|
||||
|
||||
type UnpinAllForumTopicMessages: Request<Payload = UnpinAllForumTopicMessages, Err = Self::Err>;
|
||||
|
||||
/// For Telegram documentation see [`UnpinAllForumTopicMessages`].
|
||||
fn unpin_all_forum_topic_messages<C>(
|
||||
&self,
|
||||
chat_id: C,
|
||||
message_thread_id: i32,
|
||||
) -> Self::UnpinAllForumTopicMessages
|
||||
where
|
||||
C: Into<Recipient>;
|
||||
|
||||
type AnswerCallbackQuery: Request<Payload = AnswerCallbackQuery, Err = Self::Err>;
|
||||
|
||||
/// For Telegram documentation see [`AnswerCallbackQuery`].
|
||||
|
@ -1103,6 +1170,13 @@ macro_rules! forward_all {
|
|||
get_chat_member,
|
||||
set_chat_sticker_set,
|
||||
delete_chat_sticker_set,
|
||||
get_forum_topic_icon_stickers,
|
||||
create_forum_topic,
|
||||
edit_forum_topic,
|
||||
close_forum_topic,
|
||||
reopen_forum_topic,
|
||||
delete_forum_topic,
|
||||
unpin_all_forum_topic_messages,
|
||||
answer_callback_query,
|
||||
set_my_commands,
|
||||
get_my_commands,
|
||||
|
|
Loading…
Reference in a new issue