mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-10 21:44:51 +00:00
Update dev.py
This commit is contained in:
parent
b58b8786f8
commit
feb7081bb2
1 changed files with 3 additions and 2 deletions
|
|
@ -4,6 +4,7 @@ import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import html
|
import html
|
||||||
|
import logging
|
||||||
import pickle
|
import pickle
|
||||||
import json
|
import json
|
||||||
import traceback
|
import traceback
|
||||||
|
|
@ -300,10 +301,10 @@ async def update_restart(self: Client, ctx: Message, strings) -> "Message":
|
||||||
|
|
||||||
|
|
||||||
@app.on_raw_update(group=-99)
|
@app.on_raw_update(group=-99)
|
||||||
async def updtebot(client, update, users, chats):
|
async def updtebot(client, update, users, chats)
|
||||||
if isinstance(update, UpdateBotStopped):
|
if isinstance(update, UpdateBotStopped):
|
||||||
user = users[update.user_id]
|
user = users[update.user_id]
|
||||||
await client.send_msg(LOG_CHANNEL, f"{user.mention} ({user.id}) " f"{'BLOCKED' if update.stopped else 'UNBLOCKED'} the bot at " f"{datetime.fromtimestamp(update.date)}")
|
await client.send_msg(LOG_CHANNEL, f"{user.first_name} ({user.id}) " f"{'BLOCKED' if update.stopped else 'UNBLOCKED'} the bot at " f"{datetime.fromtimestamp(update.date)}")
|
||||||
|
|
||||||
async def aexec(code, c, m):
|
async def aexec(code, c, m):
|
||||||
exec("async def __aexec(c, m): " + "\n p = print" + "\n replied = m.reply_to_message" + "".join(f"\n {l_}" for l_ in code.split("\n")))
|
exec("async def __aexec(c, m): " + "\n p = print" + "\n replied = m.reply_to_message" + "".join(f"\n {l_}" for l_ in code.split("\n")))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue