mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2025-12-29 09:44:50 +00:00
Fix incase userbot failed to start
This commit is contained in:
parent
52f7d6eb14
commit
5e36957449
2 changed files with 11 additions and 5 deletions
|
|
@ -12,5 +12,5 @@ SUPPORT_CHAT=YasirPediaChannel
|
|||
COMMAND_HANDLER=
|
||||
USER_SESSION=
|
||||
OPENAI_API=
|
||||
BARD_API=
|
||||
GOOGLEAI_API=
|
||||
CURRENCY_API=
|
||||
|
|
@ -88,10 +88,16 @@ BOT_ID = app.me.id
|
|||
BOT_NAME = app.me.first_name
|
||||
BOT_USERNAME = app.me.username
|
||||
if USER_SESSION:
|
||||
user.start()
|
||||
UBOT_ID = user.me.id
|
||||
UBOT_NAME = user.me.first_name
|
||||
UBOT_USERNAME = user.me.username
|
||||
try:
|
||||
user.start()
|
||||
UBOT_ID = user.me.id
|
||||
UBOT_NAME = user.me.first_name
|
||||
UBOT_USERNAME = user.me.username
|
||||
except Exception as e:
|
||||
app.log.error(f"Error while starting UBot: {e}")
|
||||
UBOT_ID = None
|
||||
UBOT_NAME = None
|
||||
UBOT_USERNAME = None
|
||||
else:
|
||||
UBOT_ID = None
|
||||
UBOT_NAME = None
|
||||
|
|
|
|||
Loading…
Reference in a new issue