Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bot.Reply() results in error "telegram: Bad Request: message thread not found (400)" for supergroup [email protected] #762

Open
kettari opened this issue Jan 8, 2025 · 0 comments

Comments

@kettari
Copy link

kettari commented Jan 8, 2025

Hello everyone,

I've encountered a specific error with the bot.Reply() method for supergroups when topics are turned off after being turned on. Steps to reproduce:

  1. Turn on topics for a chat.
  2. Turn off topics.
  3. Send any message from the user to the chat.
  4. Try to respond with bot.Reply() to that message.
  5. Receive the error: telegram: Bad Request: message thread not found (400).

Logs show that messages now contain a non-zero field message_thread_id. However, since topics are turned off, the Telegram service can't find that thread.

A temporary workaround is to set the thread value to zero:

c.Message().ThreadID = 0
return c.Reply(msg)

Version [email protected]

@kettari kettari changed the title bot.Reply() results in error "telegram: Bad Request: message thread not found (400)" for supergroup bot.Reply() results in error "telegram: Bad Request: message thread not found (400)" for supergroup [email protected] Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant