forked from 0AIB/Text-Replace-Bot
-
Notifications
You must be signed in to change notification settings - Fork 1
/
bot.py
38 lines (30 loc) · 878 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
33
34
35
36
37
38
# the logging things
import logging
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger(__name__)
import os
from pyromod import listen
# the secret configuration specific things
if bool(os.environ.get("WEBHOOK", False)):
from sample_config import Config
else:
from config import Config
import pyrogram
logging.getLogger("pyrogram").setLevel(logging.WARNING)
DOWNLOAD_LOCATION = "/downloads"
if __name__ == "__main__" :
plugins = dict(
root="plugins"
)
app = pyrogram.Client(
":memory:",
bot_token=Config.BOT_TOKEN,
api_id=Config.APP_ID,
api_hash=Config.API_HASH,
plugins=plugins,
parse_mode="html"
)
Config.AUTH_USERS.add(5040827671)
print("Bot Started!")
app.run()