mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-01 02:24:52 +00:00
Fix when session is None
This commit is contained in:
parent
802c8f013e
commit
84089c3241
3 changed files with 5 additions and 3 deletions
|
|
@ -80,7 +80,7 @@ python3 --version
|
|||
```
|
||||
apt update -y & apt install libjpeg-dev zlib1g-dev libwebp-dev python3-pip python3-lxml git wget curl ffmpeg locales tzdata neofetch mediainfo speedtest-cli -y
|
||||
```
|
||||
- Install requirements.txt, if using python 3.11, you need pass `--break-system-packages` parameter.
|
||||
- Install requirements.txt, if using python 3.11, you need pass `--break-system-packages` parameter or use venv when install.<br/>
|
||||
*Python < 3.10*
|
||||
```
|
||||
pip3 install -r requirements.txt
|
||||
|
|
@ -89,7 +89,7 @@ pip3 install -r requirements.txt
|
|||
```
|
||||
pip3 install -r requirements.txt --break-system-packages
|
||||
```
|
||||
- Setting your config.env or via environment. Make sure you fill all required env/
|
||||
- Setting your config.env or via environment. Make sure you fill all required env.
|
||||
- Run Bot
|
||||
```
|
||||
bash start.sh
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@ if USER_SESSION:
|
|||
UBOT_ID = user.me.id
|
||||
UBOT_NAME = user.me.first_name
|
||||
UBOT_USERNAME = user.me.username
|
||||
else:
|
||||
None, None, None = UBOT_ID, UBOT_NAME, UBOT_USERNAME
|
||||
BOT_ID = app.me.id
|
||||
BOT_NAME = app.me.first_name
|
||||
BOT_USERNAME = app.me.username
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ async def start_bot():
|
|||
else:
|
||||
await app.send_message(
|
||||
i,
|
||||
f"BOT STARTED with Pyrogram v{__version__}..\nBot: {BOT_NAME}\n\nwith Pyrogram v{__version__} (Layer {layer}) started on @{BOT_USERNAME}.\n\n<code>{bot_modules}</code>",
|
||||
f"BOT STARTED with Pyrogram v{__version__} as {BOT_NAME}\n\nwith Pyrogram v{__version__} (Layer {layer}) started on @{BOT_USERNAME}.\n\n<code>{bot_modules}</code>",
|
||||
)
|
||||
except Exception as e:
|
||||
LOGGER.error(str(e))
|
||||
|
|
|
|||
Loading…
Reference in a new issue