forked from Ns-AnoNymouS/string-session-generator-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbot.py
32 lines (23 loc) · 718 Bytes
/
bot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import os
import logging
import logging.config
# Get logging configurations
logging.getLogger().setLevel(logging.ERROR)
logging.getLogger("pyrogram").setLevel(logging.WARNING)
from pyrogram import Client
from pyromod import listen
API_ID = int(os.environ.get("API_ID", 0))
API_HASH = os.environ.get("API_HASH", None)
BOT_TOKEN = os.environ.get("BOT_TOKEN", None)
API_KEY = os.environ.get("API_KEY", None)
def main():
plugins = dict(root="plugins")
app = Client("String Session",
bot_token=BOT_TOKEN,
api_id=API_ID,
api_hash=API_HASH,
plugins=plugins,
workers=100)
app.run()
if __name__ == "__main__":
main()