+28
-9
@@ -5,8 +5,10 @@ import "context"
|
||||
// BaseForumTopic contains common fields for forum topic operations that require a chat ID and a message thread ID.
|
||||
// Since: Bot API 6.3
|
||||
type BaseForumTopic struct {
|
||||
ChatID int64 `json:"chat_id"`
|
||||
MessageThreadID int `json:"message_thread_id"`
|
||||
// ChatID identifies the target supergroup.
|
||||
ChatID int64 `json:"chat_id"`
|
||||
// MessageThreadID identifies the target forum topic.
|
||||
MessageThreadID int `json:"message_thread_id"`
|
||||
}
|
||||
|
||||
// GetForumTopicIconStickers returns the list of custom emoji that can be used as a forum topic icon.
|
||||
@@ -30,10 +32,18 @@ func (api *API) GetForumTopicIconStickersWithContext(ctx context.Context) ([]Sti
|
||||
// Since: Bot API 6.3
|
||||
// See https://core.telegram.org/bots/api#createforumtopic
|
||||
type CreateForumTopic struct {
|
||||
ChatID int64 `json:"chat_id"`
|
||||
Name string `json:"name"`
|
||||
IconColor ForumTopicIconColor `json:"icon_color"`
|
||||
IconCustomEmojiID string `json:"icon_custom_emoji_id"`
|
||||
// ChatID Required. Unique identifier for the target chat or username of the target supergroup in the format
|
||||
// @username
|
||||
ChatID int64 `json:"chat_id"`
|
||||
// Name Required. Topic name, 1-128 characters
|
||||
Name string `json:"name"`
|
||||
// IconColor Optional. 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).
|
||||
IconColor ForumTopicIconColor `json:"icon_color"`
|
||||
// IconCustomEmojiID Optional. Unique identifier of the custom emoji shown as the topic icon. Use
|
||||
// getForumTopicIconStickers to get all allowed custom emoji identifiers.
|
||||
IconCustomEmojiID string `json:"icon_custom_emoji_id"`
|
||||
}
|
||||
|
||||
// CreateForumTopic creates a topic in a forum supergroup.
|
||||
@@ -59,7 +69,12 @@ func (api *API) CreateForumTopicWithContext(ctx context.Context, params CreateFo
|
||||
// See https://core.telegram.org/bots/api#editforumtopic
|
||||
type EditForumTopic struct {
|
||||
BaseForumTopic
|
||||
Name string `json:"name"`
|
||||
// Name Optional. New topic name, 0-128 characters. If not specified or empty, the current name of the topic
|
||||
// will be kept.
|
||||
Name string `json:"name"`
|
||||
// IconCustomEmojiID Optional. New unique identifier of the custom emoji shown as the topic icon. Use
|
||||
// getForumTopicIconStickers to get all allowed custom emoji identifiers. Pass an empty string to remove the
|
||||
// icon. If not specified, the current icon will be kept.
|
||||
IconCustomEmojiID string `json:"icon_custom_emoji_id"`
|
||||
}
|
||||
|
||||
@@ -156,6 +171,7 @@ func (api *API) UnpinAllForumTopicMessagesWithContext(ctx context.Context, param
|
||||
// BaseGeneralForumTopic contains common fields for general forum topic operations that require a chat ID.
|
||||
// Since: Bot API 6.4
|
||||
type BaseGeneralForumTopic struct {
|
||||
// ChatID identifies the target supergroup.
|
||||
ChatID int64 `json:"chat_id"`
|
||||
}
|
||||
|
||||
@@ -163,8 +179,11 @@ type BaseGeneralForumTopic struct {
|
||||
// Since: Bot API 6.4
|
||||
// See https://core.telegram.org/bots/api#editgeneralforumtopic
|
||||
type EditGeneralForumTopic struct {
|
||||
ChatID int64 `json:"chat_id"`
|
||||
Name string `json:"name"`
|
||||
// ChatID Required. Unique identifier for the target chat or username of the target supergroup in the format
|
||||
// @username
|
||||
ChatID int64 `json:"chat_id"`
|
||||
// Name Required. New topic name, 1-128 characters
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// EditGeneralForumTopic edits the name of the 'General' topic in a forum supergroup.
|
||||
|
||||
Reference in New Issue
Block a user