update
This commit is contained in:
parent
2c259856fa
commit
51403b3604
@ -3,10 +3,10 @@ from ci import sqlite
|
||||
import time
|
||||
|
||||
|
||||
async def refresh_player(uid: str) -> str:
|
||||
async def refresh_player(uid: str, force=False) -> str:
|
||||
data = Player(uid)
|
||||
data.restore()
|
||||
if data.time + 60 * 5 > int(time.time()):
|
||||
if not force and data.time + 60 * 5 > int(time.time()):
|
||||
return "刷新过快,请稍等一会儿再试"
|
||||
text = await data.update_char()
|
||||
if not text:
|
||||
|
@ -9,8 +9,8 @@ from gspanel.__utils__ import fetchInitRes
|
||||
async def refresh_admin_command(_: Client, message: Message):
|
||||
if message.from_user.id != 347437156:
|
||||
return
|
||||
await fetchInitRes()
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user