Open
Description
When I try to create a new topic in a private group with topic mode enabled using the bot with the following code:
topicName := generateTopicName(message.Chat.Title)
iconColor := getRandomIconColor()
topicParams := &bot.CreateForumTopicParams{
ChatID: 12345678,
Name: topicName,
IconColor: iconColor,
}
topic, err := b.CreateForumTopic(ctx, topicParams)
if err != nil {
log.Printf("failed:%v", err)
errorMsg := &bot.SendMessageParams{
ChatID: message.Chat.ID,
Text: fmt.Sprintf("failed:%v", err),
}
b.SendMessage(ctx, errorMsg)
return
}
The program log returned: Bad request: chat not found
I have set the bot as an administrator of this group and allowed the bot to manage topics.
Metadata
Metadata
Assignees
Labels
No labels