This commit is contained in:
xtaodada 2022-06-04 13:31:43 +08:00
parent bb4338df1c
commit 6e975bb992
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
2 changed files with 4 additions and 2 deletions

View File

@ -24,7 +24,7 @@ class Player:
def __init__(self, uid: str):
self.uid = uid
self.time = int(time.time())
self.time = 0
if not exists(PLAYER_PATH / uid / f"{uid}.json"):
return
with open(PLAYER_PATH / uid / f"{uid}.json", "r", encoding="utf-8") as fp:
@ -84,6 +84,8 @@ class Player:
data.append(temp_)
temp_ = []
num = 0
if temp_:
data.append(temp_)
return InlineKeyboardMarkup(data)
def gen_back(self) -> InlineKeyboardMarkup:

View File

@ -5,7 +5,7 @@ from defs.refresh import refresh_player
@app.on_message(filters.command(["refresh_admin"]) & filters.private)
async def refresh_command(_: Client, message: Message):
async def refresh_admin_command(_: Client, message: Message):
if message.from_user.id != admin_id:
return
if len(message.command) == 1: