ohld/telegram-support-bot

The bot cannot forward a message when account is hidden for forwarding

Offen

#1 geöffnet am 28.01.2021

 (5 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (286 Forks)github user discovery
buggood first issue

Repository-Metriken

Stars
 (407 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

The bot won't forward the message to the user when privacy settings like:

No error handlers are registered, logging exception.
Traceback (most recent call last):
  File "/home/viktor/.local/lib/python3.8/site-packages/telegram/ext/dispatcher.py", line 432, in process_update
    handler.handle_update(update, self, check, context)
  File "/home/viktor/.local/lib/python3.8/site-packages/telegram/ext/handler.py", line 156, in handle_update
    return self.callback(update, context)
  File "/home/viktor/stuff/telegram-support-bot/handlers.py", line 47, in forward_to_user
    user_id = update.message.reply_to_message.forward_from.id
AttributeError: 'NoneType' object has no attribute 'id'

Contributor Guide