-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbot.py
More file actions
43 lines (35 loc) · 926 Bytes
/
Copy pathbot.py
File metadata and controls
43 lines (35 loc) · 926 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
33
34
35
36
37
38
39
40
41
42
43
# (©)Codexbotz
# Recode by @ReszXD
import pyromod.listen
import sys
from pyrogram import Client
from config import (
API_HASH,
APP_ID,
LOGGER,
OWNER,
TG_BOT_TOKEN,
TG_BOT_WORKERS,
)
class Bot(Client):
def __init__(self):
super().__init__(
"Bot",
api_hash=API_HASH,
api_id=APP_ID,
plugins={"root": "plugins"},
workers=TG_BOT_WORKERS,
bot_token=TG_BOT_TOKEN,
)
self.LOGGER = LOGGER
async def start(self):
await super().start()
usr_bot_me = await self.get_me()
self.set_parse_mode("html")
self.LOGGER(__name__).info(
f"[🔥 BERHASIL DIAKTIFKAN! 🔥]\n\nBOT Dibuat oleh @{OWNER}"
)
self.username = usr_bot_me.username
async def stop(self, *args):
await super().stop()
self.LOGGER(__name__).info("Bot stopped.")