Fix the crash on the not-admin warning #72
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
backmeupplz/banofbot!72
Loading…
Reference in a new issue
No description provided.
Delete branch "fix-admin-error-crash"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When someone starts a ban vote in a chat where @banofbot isn't an admin,
sendAdminErrorcalledbot.sendMessage(chat.id, chat.language, text). node-telegram-bot-api then tried to setchat_idon the text string, threwTypeError: Cannot create property 'chat_id' on string '🔥 Oops! …', and the whole bot exited and was restarted (seen in prod at 2026-10-22 18:51 UTC). The fix sends the translated text in the chat's language.Tested with the real node-telegram-bot-api (only
_requeststubbed) against MongoDB 3.6.23: master reproduces the crash; this branch sends "🔥 Oops! Looks like @banofbot is not an admin here…".🤖 Generated with Claude Code