forked from Ts-Bots/AutoCaption-Ts_Bot-Clone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bot.py
30 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
import pyrogram
import logging
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger(__name__)
import os
from config import Config
from pyrogram import Client
logging.getLogger("pyrogram").setLevel(logging.WARNING)
class autocaption(Client):
def __init__(self):
super().__init__(
session_name="Captioner",
bot_token = Config.BOT_TOKEN,
api_id = Config.API_ID,
api_hash = Config.API_HASH,
workers = 20,
plugins = dict(
root="Plugins"
)
)
if __name__ == "__main__" :
autocaption().run()