Update chatbot/__init__.py
Browse files- chatbot/__init__.py +0 -14
chatbot/__init__.py
CHANGED
@@ -29,18 +29,6 @@ from pyrogram import __version__ as pyrogram_version
|
|
29 |
StartTime = time.time()
|
30 |
START_TIME = dt.now()
|
31 |
|
32 |
-
async def send_log(text_log: str):
|
33 |
-
url = "https://private-akeno.randydev.my.id/api/v2/send_message_logs"
|
34 |
-
params = {
|
35 |
-
"text_log": text_log
|
36 |
-
}
|
37 |
-
async with aiohttp.ClientSession() as session:
|
38 |
-
async with session.post(url, params=params) as response:
|
39 |
-
if response.status != 200:
|
40 |
-
return None
|
41 |
-
data = await response.json()
|
42 |
-
return data["message"]
|
43 |
-
|
44 |
class Randydev(Client):
|
45 |
def __init__(self, loop=None):
|
46 |
self.loop = loop or asyncio.get_event_loop()
|
@@ -58,7 +46,6 @@ class Randydev(Client):
|
|
58 |
try:
|
59 |
await super().start()
|
60 |
except FloodWait as e:
|
61 |
-
await send_log(f"GPT-4 Bot: {e.value}")
|
62 |
await asyncio.sleep(e.value)
|
63 |
self.start_time = time.time()
|
64 |
LOGS.info(
|
@@ -67,7 +54,6 @@ class Randydev(Client):
|
|
67 |
layer,
|
68 |
self.me.username,
|
69 |
)
|
70 |
-
await send_log(f"akn running with Pyrogram started on @{self.me.username} Hi!")
|
71 |
async def stop(self):
|
72 |
try:
|
73 |
await super().stop()
|
|
|
29 |
StartTime = time.time()
|
30 |
START_TIME = dt.now()
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
class Randydev(Client):
|
33 |
def __init__(self, loop=None):
|
34 |
self.loop = loop or asyncio.get_event_loop()
|
|
|
46 |
try:
|
47 |
await super().start()
|
48 |
except FloodWait as e:
|
|
|
49 |
await asyncio.sleep(e.value)
|
50 |
self.start_time = time.time()
|
51 |
LOGS.info(
|
|
|
54 |
layer,
|
55 |
self.me.username,
|
56 |
)
|
|
|
57 |
async def stop(self):
|
58 |
try:
|
59 |
await super().stop()
|