forked from freecontent/My-File-Store-Bot-AllVersion
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbot.py
More file actions
28 lines (21 loc) · 642 Bytes
/
bot.py
File metadata and controls
28 lines (21 loc) · 642 Bytes
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
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
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)
def main():
plugins = dict(root="plugins")
app = Client("FileStore",
bot_token=BOT_TOKEN,
api_id=API_ID,
api_hash=API_HASH,
plugins=plugins,
workers=100)
app.run()
if __name__ == "__main__":
main()