Spaces:
Paused
Paused
Download bot.py from saske560/userbotsaskeds: direct link, hf CLI and curl.
- Browser
- Download file 518 Bytes
-
https://huggingface.co/spaces/saske560/userbotsaskeds/resolve/main/bot.py
- Command line
-
hf download hf://spaces/saske560/userbotsaskeds/bot.py
-
curl -L -o bot.py https://huggingface.co/spaces/saske560/userbotsaskeds/resolve/main/bot.py
518 Bytes
| from pyrogram import Client | |
| from pyrogram import utils | |
| from config import Config | |
| # Fix para Pyrogram 2.x con IDs nuevos de canales/supergrupos. | |
| # Algunos chats ya tienen IDs tipo -1002456847960, más bajos que el | |
| # límite antiguo de Pyrogram, y eso provoca: ValueError("Peer id invalid"). | |
| utils.MIN_CHANNEL_ID = -100999999999999 | |
| app = Client( | |
| name="userbot", | |
| api_id=Config.API_ID, | |
| api_hash=Config.API_HASH, | |
| session_string=Config.SESSION_STRING, | |
| in_memory=True, # no .session file on disk | |
| ) | |