fix a bug

This commit is contained in:
xtaodada 2022-08-02 23:17:49 +08:00
parent 27316040f9
commit 86b5c78837
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -63,6 +63,9 @@ async def run_every_10_minute():
@Client.on_message(filters.incoming & filters.private & filters.chat(admin_id) & @Client.on_message(filters.incoming & filters.private & filters.chat(admin_id) &
filters.command(["force_update", ])) filters.command(["force_update", ]))
async def force_update(_: Client, message: Message): async def force_update(_: Client, message: Message):
a = int(message.text.replace("/force_update", "").strip()) try:
a = int(message.text.replace("/force_update", "").strip())
except ValueError:
a = None
await run_every_10_minute(a) await run_every_10_minute(a)
await message.reply("ok!") await message.reply("ok!")