fix: posts from channels detected as bots (#1076)
* fix(): posts from channels detected as bots Possibly fixes #937 * fix(): use getattr instead of hasattr
This commit is contained in:
parent
cf8de7d7a6
commit
37f0bfbd34
|
@ -36,6 +36,12 @@ def command_whois(update: Update, context: CallbackContext) -> None:
|
|||
from_user = original_message.forward_from
|
||||
|
||||
if from_user.is_bot:
|
||||
if getattr(original_message, 'sender_chat', None):
|
||||
update.message.reply_text(
|
||||
"Сообщение отправлено от имени чата/канала",
|
||||
quote=True
|
||||
)
|
||||
return
|
||||
update.message.reply_text(
|
||||
"Это бот, глупышка",
|
||||
quote=True
|
||||
|
|
Loading…
Reference in New Issue