bostrot / telegram-support-bot

A Telegram ticketing/supporting system.
https://botspace.bostrot.com
GNU General Public License v3.0
447 stars 152 forks source link

Error: 403: Forbidden: bot was kicked from the supergroup chat #71

Closed bostrot closed 2 years ago

bostrot commented 3 years ago

Describe the bug Simliar to #65 unhandled rejections occur when the bot was kicked from a supergroup while trying to reply to a message.

Additional context

=== UNHANDLED REJECTION ===
'Thu Sep 16 2021 12:42:54 GMT+0200 (Central European Summer Time): Error: 403: Forbidden: bot was kicked from the supergroup chat\n' +
  '    at /home/bostrot/proj/telegram-support-bot/node_modules/telegraf/core/network/client.js:281:17\n' +
  '    at processTicksAndRejections (internal/process/task_queues.js:95:5)'
bostrot commented 3 years ago

Commit af43951c5ff80831b9ce2681b7d7e6b35417a8f4 should improve error handling with catching the reply function. Still needs to be tested if it actually solves it as the error is hard to reproduce.

bostrot commented 2 years ago

Closing for now as that commit should have fixed it for now. Reopen if that error reoccurs.

chakzefir commented 2 years ago

Hey @bostrot I'm getting an error adding bot to supergroup, are there any workaround to fix it?

Thu Jun 23 2022 06:31:19 GMT+0000 (Coordinated Universal Time): Error: 400: Bad Request: group chat was upgraded to a supergroup chat
bostrot commented 2 years ago

Hey @bostrot I'm getting an error adding bot to supergroup, are there any workaround to fix it?

Thu Jun 23 2022 06:31:19 GMT+0000 (Coordinated Universal Time): Error: 400: Bad Request: group chat was upgraded to a supergroup chat

Yes, see following: https://github.com/bostrot/telegram-support-bot/issues/16#issuecomment-491625213

chakzefir commented 2 years ago

@bostrot thank you. Updated settings in bot father (for the group), also gave it admin privileges in group (even they are not required). bot

Bot continues to reply: Message is not sent due to an error.

And the logs like this:

'Mon Jul 18 2022 10:05:20 GMT+0000 (Coordinated Universal Time): Error: 400: Bad Request: chat not found\n' +

p.s. Working fine while not in supergroup.

bostrot commented 2 years ago

@bostrot thank you. Updated settings in bot father (for the group), also gave it admin privileges in group (even they are not required). bot

Bot continues to reply: Message is not sent due to an error.

And the logs like this:

'Mon Jul 18 2022 10:05:20 GMT+0000 (Coordinated Universal Time): Error: 400: Bad Request: chat not found\n' +

p.s. Working fine while not in supergroup.

Please recheck your Group ID with the /id command.

chakzefir commented 2 years ago

@bostrot oh yeah, it works. We took id from web version of telegram before that. Thank you for that 🙏