From 57edb3755b38ca49941ab79420efe59ad667541d Mon Sep 17 00:00:00 2001 From: thedragonsinn <98635854+thedragonsinn@users.noreply.github.com> Date: Wed, 5 Jun 2024 15:56:28 +0530 Subject: [PATCH] non-dual mode bug fix. --- app/plugins/misc/alive.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/plugins/misc/alive.py b/app/plugins/misc/alive.py index cd91bdb..740fd22 100644 --- a/app/plugins/misc/alive.py +++ b/app/plugins/misc/alive.py @@ -21,7 +21,7 @@ PY_VERSION = f"{version_info.major}.{version_info.minor}.{version_info.micro}" @bot.add_cmd(cmd="alive") async def alive(bot: BOT, message: Message): # Inline Alive if Dual Mode - if bot.is_user and bot.has_bot: + if bot.is_user and getattr(bot, "has_bot", None): inline_result: BotResults = await bot.get_inline_bot_results( bot=bot.bot.me.username, query="inline_alive" ) @@ -47,7 +47,7 @@ async def alive(bot: BOT, message: Message): ) -if bot.is_bot or bot.has_bot: +if bot.is_bot or getattr(bot, "has_bot", None): @bot.bot.on_inline_query(filters=filters.regex("^inline_alive$"), group=2) async def return_inline_alive_results(bot: BOT, inline_query: InlineQuery):