forked from TR-TECH-GUIDE/Auto-Forward-Bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuser.py
More file actions
27 lines (22 loc) · 674 Bytes
/
user.py
File metadata and controls
27 lines (22 loc) · 674 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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# (c) TRTECHGUIDE
from config import Config
from config import LOGGER
from pyrogram import Client, __version__
class User(Client):
def __init__(self):
super().__init__(
Config.SESSION,
api_hash=Config.API_HASH,
api_id=Config.API_ID,
workers=4
)
self.LOGGER = LOGGER
async def start(self):
await super().start()
usr_bot_me = await self.get_me()
return (self, usr_bot_me.id)
async def stop(self, *args):
await super().stop()
self.LOGGER(__name__).info("Bot stopped. Bye.")