@@ -6,10 +6,10 @@ import (
66)
77
88type Topic struct {
9- Name string `json:"name"`
10- IconColor int `json:"icon_color"`
11- IconCustomEmojiID string `json:"icon_custom_emoji_id"`
12- ThreadID int `json:"message_thread_id"`
9+ Name string `json:"name"`
10+ IconColor int `json:"icon_color"`
11+ IconCustomEmoji string `json:"icon_custom_emoji_id"`
12+ ThreadID int `json:"message_thread_id"`
1313}
1414
1515// CreateTopic creates a topic in a forum supergroup chat.
@@ -22,8 +22,8 @@ func (b *Bot) CreateTopic(chat *Chat, topic *Topic) (*Topic, error) {
2222 if topic .IconColor != 0 {
2323 params ["icon_color" ] = strconv .Itoa (topic .IconColor )
2424 }
25- if topic .IconCustomEmojiID != "" {
26- params ["icon_custom_emoji_id" ] = topic .IconCustomEmojiID
25+ if topic .IconCustomEmoji != "" {
26+ params ["icon_custom_emoji_id" ] = topic .IconCustomEmoji
2727 }
2828
2929 data , err := b .Raw ("createForumTopic" , params )
@@ -50,8 +50,8 @@ func (b *Bot) EditTopic(chat *Chat, topic *Topic) error {
5050 if topic .Name != "" {
5151 params ["name" ] = topic .Name
5252 }
53- if topic .IconCustomEmojiID != "" {
54- params ["icon_custom_emoji_id" ] = topic .IconCustomEmojiID
53+ if topic .IconCustomEmoji != "" {
54+ params ["icon_custom_emoji_id" ] = topic .IconCustomEmoji
5555 }
5656
5757 _ , err := b .Raw ("editForumTopic" , params )
0 commit comments