Icon of the topic. Icon color must be
+ one of 0x6FB9F0, 0xFFD67E, 0xCB86DB,
+ 0x8EEE98, 0xFF93B2, or 0xFB6F5F.
+ Telegram Premium users can use any
+ custom emoji as topic icon, other
+ users can use only a custom emoji
+ returned by getForumTopicDefaultIcons.
Creates a topic in a forum supergroup
+ chat; requires canManageTopics rights
+ in the supergroup.
+ Returns ForumTopicInfo
+
+
Parameters:
+
chatId - long Identifier of the chat.
+
name - String Name of the topic; 1-128 characters.
+
icon - ForumTopicIcon Icon of the topic. Icon color must be
+ one of 0x6FB9F0, 0xFFD67E, 0xCB86DB,
+ 0x8EEE98, 0xFF93B2, or 0xFB6F5F.
+ Telegram Premium users can use any
+ custom emoji as topic icon, other
+ users can use only a custom emoji
+ returned by getForumTopicDefaultIcons.
Deletes all messages in a forum topic;
+ requires canDeleteMessages administrator
+ rights in the supergroup unless the
+ user is creator of the topic, the
+ topic has no messages from other users
+ and has at most 11 messages.
+ Returns Ok
Deletes all messages in a forum topic;
+ requires canDeleteMessages administrator
+ rights in the supergroup unless the
+ user is creator of the topic, the
+ topic has no messages from other users
+ and has at most 11 messages.
Deletes all messages in a forum topic;
+ requires canDeleteMessages administrator
+ rights in the supergroup unless the
+ user is creator of the topic, the
+ topic has no messages from other users
+ and has at most 11 messages.
Deletes all messages in a forum topic;
+ requires canDeleteMessages administrator
+ rights in the supergroup unless the
+ user is creator of the topic, the
+ topic has no messages from other users
+ and has at most 11 messages.
Deletes all messages in a forum topic;
+ requires canDeleteMessages administrator
+ rights in the supergroup unless the
+ user is creator of the topic, the
+ topic has no messages from other users
+ and has at most 11 messages.
+ Returns Ok
+
+
+
+
+
DeleteForumTopic
+
publicDeleteForumTopic(long chatId,
+ long messageThreadId)
+
Deletes all messages in a forum topic;
+ requires canDeleteMessages administrator
+ rights in the supergroup unless the
+ user is creator of the topic, the
+ topic has no messages from other users
+ and has at most 11 messages.
+ Returns Ok
+
+
Parameters:
+
chatId - long Identifier of the chat.
+
messageThreadId - long Message thread identifier of the forum topic.
Deletes all messages in a forum topic;
+ requires canDeleteMessages administrator
+ rights in the supergroup unless the
+ user is creator of the topic, the
+ topic has no messages from other users
+ and has at most 11 messages.
+ Returns Ok
Edits title and icon of a topic in a
+ forum supergroup chat; requires
+ canManageTopics administrator rights
+ in the supergroup unless the user is
+ creator of the topic.
+ Returns Ok
Edits title and icon of a topic in a
+ forum supergroup chat; requires
+ canManageTopics administrator rights
+ in the supergroup unless the user is
+ creator of the topic.
+
+
EditForumTopic(long chatId,
+ long messageThreadId,
+ String name,
+ long iconCustomEmojiId)
+
+
Edits title and icon of a topic in a
+ forum supergroup chat; requires
+ canManageTopics administrator rights
+ in the supergroup unless the user is
+ creator of the topic.
Edits title and icon of a topic in a
+ forum supergroup chat; requires
+ canManageTopics administrator rights
+ in the supergroup unless the user is
+ creator of the topic.
Identifier of the new custom emoji
+ for topic icon. Telegram Premium users
+ can use any custom emoji, other users
+ can use only a custom emoji returned by getForumTopicDefaultIcons.
Edits title and icon of a topic in a
+ forum supergroup chat; requires
+ canManageTopics administrator rights
+ in the supergroup unless the user is
+ creator of the topic.
+ Returns Ok
+
+
+
+
+
EditForumTopic
+
publicEditForumTopic(long chatId,
+ long messageThreadId,
+ String name,
+ long iconCustomEmojiId)
+
Edits title and icon of a topic in a
+ forum supergroup chat; requires
+ canManageTopics administrator rights
+ in the supergroup unless the user is
+ creator of the topic.
+ Returns Ok
+
+
Parameters:
+
chatId - long Identifier of the chat.
+
messageThreadId - long Message thread identifier of the forum topic.
+
name - String New name of the topic; 1-128 characters.
+
iconCustomEmojiId - long Identifier of the new custom emoji
+ for topic icon. Telegram Premium users
+ can use any custom emoji, other users
+ can use only a custom emoji returned by getForumTopicDefaultIcons.
Edits title and icon of a topic in a
+ forum supergroup chat; requires
+ canManageTopics administrator rights
+ in the supergroup unless the user is
+ creator of the topic.
+ Returns Ok
Returns sponsored messages to be shown
in a chat; for channel chats only.
- Returns a 404 error if there is no
- sponsored message in the chat.
- Returns SponsoredMessage
Returns sponsored messages to be shown
in a chat; for channel chats only.
- Returns a 404 error if there is no
- sponsored message in the chat.
- Returns SponsoredMessage
Returns sponsored messages to be shown
in a chat; for channel chats only.
- Returns a 404 error if there is no
- sponsored message in the chat.
- Returns SponsoredMessage
Returns sponsored messages to be shown
in a chat; for channel chats only.
- Returns a 404 error if there is no
- sponsored message in the chat.
- Returns SponsoredMessage
publicMessageForumTopicEdited(String name,
+ boolean editIconCustomEmojiId,
+ long iconCustomEmojiId)
+
A forum topic has been edited.
+
+
Parameters:
+
name - String If non-empty, the new name of the topic.
+
editIconCustomEmojiId - boolean True, if icon's customEmojiId is changed.
+
iconCustomEmojiId - long New unique identifier of the custom
+ emoji shown on the topic icon; 0 if
+ none. Must be ignored if editIconCustomEmojiId is false.
messages - SponsoredMessage[] List of sponsored messages.
+
messagesBetween - int The minimum number of messages between
+ shown sponsored messages, or 0 if only
+ one sponsored message must be shown
+ after all ordinary messages.
public static final class TdApi.ToggleForumTopicIsClosed
+extends TdApi.Function<TdApi.Ok>
+
Toggles whether a topic is closed in
+ a forum supergroup chat; requires
+ canManageTopics administrator rights
+ in the supergroup unless the user is
+ creator of the topic.
+ Returns Ok
Toggles whether a topic is closed in
+ a forum supergroup chat; requires
+ canManageTopics administrator rights
+ in the supergroup unless the user is
+ creator of the topic.
Toggles whether a topic is closed in
+ a forum supergroup chat; requires
+ canManageTopics administrator rights
+ in the supergroup unless the user is
+ creator of the topic.
Toggles whether a topic is closed in
+ a forum supergroup chat; requires
+ canManageTopics administrator rights
+ in the supergroup unless the user is
+ creator of the topic.
Toggles whether a topic is closed in
+ a forum supergroup chat; requires
+ canManageTopics administrator rights
+ in the supergroup unless the user is
+ creator of the topic.
+ Returns Ok
+
+
+
+
+
ToggleForumTopicIsClosed
+
publicToggleForumTopicIsClosed(long chatId,
+ long messageThreadId,
+ boolean isClosed)
+
Toggles whether a topic is closed in
+ a forum supergroup chat; requires
+ canManageTopics administrator rights
+ in the supergroup unless the user is
+ creator of the topic.
+ Returns Ok
+
+
Parameters:
+
chatId - long Identifier of the chat.
+
messageThreadId - long Message thread identifier of the forum topic.
+
isClosed - boolean Pass true to close the topic; pass
+ false to reopen it.
Toggles whether a topic is closed in
+ a forum supergroup chat; requires
+ canManageTopics administrator rights
+ in the supergroup unless the user is
+ creator of the topic.
+ Returns Ok
Toggles whether the supergroup is a
+ forum; requires owner privileges in the supergroup.
+ Returns Ok
+
+
Parameters:
+
supergroupId - long Identifier of the supergroup.
+
isForum - boolean New value of isForum. A supergroup
+ can be converted to a forum, only if
+ it has at least
+ GetOption("forum_member_count_min") members.
public static final class TdApi.ToggleSupergroupUsernameIsActive
+extends TdApi.Function<TdApi.Ok>
+
Changes active state for a username
+ of a supergroup or channel, requires
+ owner privileges in the supergroup or
+ channel. The editable username can't
+ be disabled. May return an error with
+ a message "USERNAMES_ACTIVE_TOO_MUCH"
+ if the maximum number of active
+ usernames has been reached.
+ Returns Ok
Changes active state for a username
+ of a supergroup or channel, requires
+ owner privileges in the supergroup or
+ channel. The editable username can't
+ be disabled. May return an error with
+ a message "USERNAMES_ACTIVE_TOO_MUCH"
+ if the maximum number of active
+ usernames has been reached.
+ Returns Ok
Changes active state for a username
+ of a supergroup or channel, requires
+ owner privileges in the supergroup or
+ channel. The editable username can't
+ be disabled. May return an error with
+ a message "USERNAMES_ACTIVE_TOO_MUCH"
+ if the maximum number of active
+ usernames has been reached.
+ Returns Ok
+
+
Parameters:
+
supergroupId - long Identifier of the supergroup or channel.
+
username - String The username to change.
+
isActive - boolean Pass true to activate the username;
+ pass false to disable it.
Changes active state for a username
+ of a supergroup or channel, requires
+ owner privileges in the supergroup or
+ channel. The editable username can't
+ be disabled. May return an error with
+ a message "USERNAMES_ACTIVE_TOO_MUCH"
+ if the maximum number of active
+ usernames has been reached.
+ Returns Ok
public static final class TdApi.ToggleUsernameIsActive
+extends TdApi.Function<TdApi.Ok>
+
Changes active state for a username
+ of the current user. The editable
+ username can't be disabled. May
+ return an error with a message
+ "USERNAMES_ACTIVE_TOO_MUCH"
+ if the maximum number of active
+ usernames has been reached.
+ Returns Ok
Changes active state for a username
+ of the current user. The editable
+ username can't be disabled. May
+ return an error with a message
+ "USERNAMES_ACTIVE_TOO_MUCH"
+ if the maximum number of active
+ usernames has been reached.
+ Returns Ok
Changes active state for a username
+ of the current user. The editable
+ username can't be disabled. May
+ return an error with a message
+ "USERNAMES_ACTIVE_TOO_MUCH"
+ if the maximum number of active
+ usernames has been reached.
+ Returns Ok
+
+
Parameters:
+
username - String The username to change.
+
isActive - boolean Pass true to activate the username;
+ pass false to disable it.
Changes active state for a username
+ of the current user. The editable
+ username can't be disabled. May
+ return an error with a message
+ "USERNAMES_ACTIVE_TOO_MUCH"
+ if the maximum number of active
+ usernames has been reached.
+ Returns Ok
List of active usernames; the first
+ one must be shown as the primary
+ username. The order of active usernames
+ can be changed with reorderActiveUsernames or reorderSupergroupActiveUsernames.
Describes usernames assigned to a
+ user, a supergroup, or a channel.
+
+
Parameters:
+
activeUsernames - String[] List of active usernames; the first
+ one must be shown as the primary
+ username. The order of active usernames
+ can be changed with reorderActiveUsernames or reorderSupergroupActiveUsernames.
+
disabledUsernames - String[] List of currently disabled usernames;
+ the username can be activated with toggleUsernameIsActive/toggleSupergroupUsernameIsActive.
+
editableUsername - String The active username, which can be
+ changed with setUsername/setSupergroupUsername.