auto-renamer / plugins /admin /admin.py
dragxd's picture
Final: Restore /myusage, remove /upgrade and all plan-related codes
ef51582
raw
history blame contribute delete
587 Bytes
from pyrogram.types import (InlineKeyboardButton, InlineKeyboardMarkup)
from config import *
from pyrogram import Client, filters
@Client.on_message(filters.private & filters.user(ADMIN) & filters.command(["warn"]))
async def warn(c, m):
if len(m.command) >= 3:
try:
user_id = m.text.split(' ', 2)[1]
reason = m.text.split(' ', 2)[2]
await m.reply_text("User Notfied Sucessfully 😁")
await c.send_message(chat_id=int(user_id), text=reason)
except:
await m.reply_text("User Not Notfied Sucessfully πŸ˜”")