-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbot.py
More file actions
27 lines (22 loc) · 750 Bytes
/
bot.py
File metadata and controls
27 lines (22 loc) · 750 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
#-------------------------------------- https://github.com/jankarikiduniya ------------------------------------------#
import os
import logging
from pyrogram import Client
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger(__name__)
logging.getLogger("pyrogram").setLevel(logging.WARNING)
if bool(os.environ.get("ENV", False)):
from sample_config import Config
else:
from config import Config
if __name__ == "__main__":
plugins = dict(root="plugins")
bot = Client(
"pmbot",
bot_token=Config.TG_BOT_TOKEN,
api_id=Config.APP_ID,
api_hash=Config.API_HASH,
plugins=plugins
)
bot.run()