-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathbot.py
More file actions
32 lines (22 loc) · 683 Bytes
/
bot.py
File metadata and controls
32 lines (22 loc) · 683 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
29
30
31
32
from pyrogram import Client
from config import API_ID, API_HASH, BOT_TOKEN
class Bot(Client):
def __init__(self):
super().__init__(
"vj join request bot",
api_id=API_ID,
api_hash=API_HASH,
bot_token=BOT_TOKEN,
plugins=dict(root="plugins"),
workers=50,
sleep_threshold=10
)
async def start(self):
await super().start()
me = await self.get_me()
self.username = '@' + me.username
print('Bot Started Powered By @VJ_Botz')
async def stop(self, *args):
await super().stop()
print('Bot Stopped Bye')
Bot().run()