From 86b5c7883750e44b52e40c30cc181b015b594153 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Tue, 2 Aug 2022 23:17:49 +0800 Subject: [PATCH] fix a bug --- plugins/track.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/track.py b/plugins/track.py index 0066044..da1b125 100644 --- a/plugins/track.py +++ b/plugins/track.py @@ -63,6 +63,9 @@ async def run_every_10_minute(): @Client.on_message(filters.incoming & filters.private & filters.chat(admin_id) & filters.command(["force_update", ])) 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 message.reply("ok!")