Module telegram-bot-lua.methods.forum
forum API methods.
Functions
| api.close_forum_topic(chat_id, message_thread_id) | close an open topic in a forum supergroup chat. |
| api.close_general_forum_topic(chat_id) | close an open 'General' topic in a forum supergroup chat. |
| api.create_forum_topic(chat_id, name, opts) | create a topic in a forum supergroup chat. |
| api.delete_forum_topic(chat_id, message_thread_id) | delete a forum topic along with all its messages in a forum supergroup chat. |
| api.edit_forum_topic(chat_id, message_thread_id, opts) | edit name and icon of a topic in a forum supergroup chat. |
| api.edit_general_forum_topic(chat_id, name) | edit the name of the 'General' topic in a forum supergroup chat. |
| api.get_forum_topic_icon_stickers() | get custom emoji stickers which can be used as a forum topic icon. |
| api.hide_general_forum_topic(chat_id) | hide the 'General' topic in a forum supergroup chat. |
| api.reopen_forum_topic(chat_id, message_thread_id) | reopen a closed topic in a forum supergroup chat. |
| api.reopen_general_forum_topic(chat_id) | reopen a closed 'General' topic in a forum supergroup chat. |
| api.unhide_general_forum_topic(chat_id) | unhide the 'General' topic in a forum supergroup chat. |
| api.unpin_all_forum_topic_messages(chat_id, message_thread_id) | clear the list of pinned messages in a forum topic. |
| api.unpin_all_general_forum_topic_messages(chat_id) | clear the list of pinned messages in the general forum topic. |
Functions
- api.close_forum_topic(chat_id, message_thread_id)
-
close an open topic in a forum supergroup chat.
Parameters:
- chat_id number|string unique identifier for the target chat or username of the target supergroup
- message_thread_id number unique identifier for the target message thread of the forum topic
Returns:
-
table,number the response object and HTTP status
- api.close_general_forum_topic(chat_id)
-
close an open 'General' topic in a forum supergroup chat.
Parameters:
- chat_id number|string unique identifier for the target chat or username of the target supergroup
Returns:
-
table,number the response object and HTTP status
- api.create_forum_topic(chat_id, name, opts)
-
create a topic in a forum supergroup chat. name is truncated to 128 characters.
Parameters:
- chat_id number|string unique identifier for the target chat or username of the target supergroup
- name string topic name (max 128 characters)
- opts table optional parameters
- icon_color number colour of the topic icon in RGB format
- icon_custom_emoji_id string unique identifier of the custom emoji shown as the topic icon
Returns:
-
table,number the response object and HTTP status
- api.delete_forum_topic(chat_id, message_thread_id)
-
delete a forum topic along with all its messages in a forum supergroup chat.
Parameters:
- chat_id number|string unique identifier for the target chat or username of the target supergroup
- message_thread_id number unique identifier for the target message thread of the forum topic
Returns:
-
table,number the response object and HTTP status
- api.edit_forum_topic(chat_id, message_thread_id, opts)
-
edit name and icon of a topic in a forum supergroup chat.
Parameters:
- chat_id number|string unique identifier for the target chat or username of the target supergroup
- message_thread_id number unique identifier for the target message thread of the forum topic
- opts table optional parameters
- name string new topic name (max 128 characters)
- icon_custom_emoji_id string new unique identifier of the custom emoji shown as the topic icon
Returns:
-
table,number the response object and HTTP status
- api.edit_general_forum_topic(chat_id, name)
-
edit the name of the 'General' topic in a forum supergroup chat. name is truncated to 128 characters.
Parameters:
- chat_id number|string unique identifier for the target chat or username of the target supergroup
- name string new topic name (max 128 characters)
Returns:
-
table,number the response object and HTTP status
- api.get_forum_topic_icon_stickers()
-
get custom emoji stickers which can be used as a forum topic icon.
Returns:
-
table,number the response object and HTTP status
- api.hide_general_forum_topic(chat_id)
-
hide the 'General' topic in a forum supergroup chat.
Parameters:
- chat_id number|string unique identifier for the target chat or username of the target supergroup
Returns:
-
table,number the response object and HTTP status
- api.reopen_forum_topic(chat_id, message_thread_id)
-
reopen a closed topic in a forum supergroup chat.
Parameters:
- chat_id number|string unique identifier for the target chat or username of the target supergroup
- message_thread_id number unique identifier for the target message thread of the forum topic
Returns:
-
table,number the response object and HTTP status
- api.reopen_general_forum_topic(chat_id)
-
reopen a closed 'General' topic in a forum supergroup chat.
Parameters:
- chat_id number|string unique identifier for the target chat or username of the target supergroup
Returns:
-
table,number the response object and HTTP status
- api.unhide_general_forum_topic(chat_id)
-
unhide the 'General' topic in a forum supergroup chat.
Parameters:
- chat_id number|string unique identifier for the target chat or username of the target supergroup
Returns:
-
table,number the response object and HTTP status
- api.unpin_all_forum_topic_messages(chat_id, message_thread_id)
-
clear the list of pinned messages in a forum topic.
Parameters:
- chat_id number|string unique identifier for the target chat or username of the target supergroup
- message_thread_id number unique identifier for the target message thread of the forum topic
Returns:
-
table,number the response object and HTTP status
- api.unpin_all_general_forum_topic_messages(chat_id)
-
clear the list of pinned messages in the general forum topic.
Parameters:
- chat_id number|string unique identifier for the target chat or username of the target supergroup
Returns:
-
table,number the response object and HTTP status