21 lines
788 B
Python
21 lines
788 B
Python
from pyrogram import filters, Client
|
|
from pyrogram.types import Message
|
|
from ci import app
|
|
from defs.refresh import refresh_player
|
|
from gspanel.__utils__ import fetchInitRes
|
|
|
|
|
|
@app.on_message(filters.command("refresh_admin") & filters.private)
|
|
async def refresh_admin_command(_: Client, message: Message):
|
|
if message.from_user.id != 347437156:
|
|
return
|
|
if len(message.command) == 1:
|
|
await fetchInitRes()
|
|
return await message.reply("请输入 uid", quote=True)
|
|
if not message.command[1].isnumeric():
|
|
return await message.reply("请输入正确的 uid", quote=True)
|
|
uid = message.command[1]
|
|
msg = await message.reply("正在刷新数据,请稍等。。。", quote=True)
|
|
text = await refresh_player(uid, True)
|
|
await msg.edit(text)
|