8000 Not possible to use bot to create a topic in a private group with topic mode turned on. · Issue #134 · go-telegram/bot · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Not possible to use bot to create a topic in a private group with topic mode turned on. #134
Open
@lzhan0121

Description

@lzhan0121

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
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0