Skip to content

Commit

Permalink
small fix for 'NoneType' object has no attribute 'lower'
Browse files Browse the repository at this point in the history
  • Loading branch information
BennyThink committed Dec 21, 2023
1 parent c2d5afb commit 613f36b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ytdlbot/ytdl_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def wrapper(client: Client, message: types.Message):
chat_id = getattr(message.from_user, "id", None)

# message type check
if message.chat.type != enums.ChatType.PRIVATE and not message.text.lower().startswith("/ytdl"):
if message.chat.type != enums.ChatType.PRIVATE and not getattr(message, "text", "").lower().startswith("/ytdl"):
logging.debug("%s, it's annoying me...🙄️ ", message.text)
return

Expand Down

0 comments on commit 613f36b

Please sign in to comment.