From 613f36bef81e094630913b00464f1cd3332584aa Mon Sep 17 00:00:00 2001 From: Benny Date: Thu, 21 Dec 2023 19:47:53 +0100 Subject: [PATCH] small fix for 'NoneType' object has no attribute 'lower' --- ytdlbot/ytdl_bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ytdlbot/ytdl_bot.py b/ytdlbot/ytdl_bot.py index 4d51839a..103ee4f8 100644 --- a/ytdlbot/ytdl_bot.py +++ b/ytdlbot/ytdl_bot.py @@ -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