topic: rename IconCustomEmojiID to IconCustomEmoji

v3.3
Demian 2 months ago
parent e4f891ba6c
commit 0d0d5e7473

@ -6,10 +6,10 @@ import (
)
type Topic struct {
Name string `json:"name"`
IconColor int `json:"icon_color"`
IconCustomEmojiID string `json:"icon_custom_emoji_id"`
ThreadID int `json:"message_thread_id"`
Name string `json:"name"`
IconColor int `json:"icon_color"`
IconCustomEmoji string `json:"icon_custom_emoji_id"`
ThreadID int `json:"message_thread_id"`
}
// CreateTopic creates a topic in a forum supergroup chat.
@ -22,8 +22,8 @@ func (b *Bot) CreateTopic(chat *Chat, topic *Topic) (*Topic, error) {
if topic.IconColor != 0 {
params["icon_color"] = strconv.Itoa(topic.IconColor)
}
if topic.IconCustomEmojiID != "" {
params["icon_custom_emoji_id"] = topic.IconCustomEmojiID
if topic.IconCustomEmoji != "" {
params["icon_custom_emoji_id"] = topic.IconCustomEmoji
}
data, err := b.Raw("createForumTopic", params)
@ -50,8 +50,8 @@ func (b *Bot) EditTopic(chat *Chat, topic *Topic) error {
if topic.Name != "" {
params["name"] = topic.Name
}
if topic.IconCustomEmojiID != "" {
params["icon_custom_emoji_id"] = topic.IconCustomEmojiID
if topic.IconCustomEmoji != "" {
params["icon_custom_emoji_id"] = topic.IconCustomEmoji
}
_, err := b.Raw("editForumTopic", params)

Loading…
Cancel
Save