-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy pathmain.py
More file actions
26 lines (22 loc) · 698 Bytes
/
main.py
File metadata and controls
26 lines (22 loc) · 698 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
from pyrogram import Client
from config import API_ID, API_HASH, BOT_TOKEN
class Bot(Client):
def __init__(self):
super().__init__(
"vj string session bot",
api_id=API_ID,
api_hash=API_HASH,
bot_token=BOT_TOKEN,
plugins=dict(root="TechVJ"),
workers=150,
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()