From 42c9e1daa62986535cda0f67186c9cf41a4d5efd Mon Sep 17 00:00:00 2001 From: Rongrong <15956627+Rongronggg9@users.noreply.github.com> Date: Fri, 18 Mar 2022 01:36:55 +0800 Subject: [PATCH] make command async --- SlashBot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SlashBot.py b/SlashBot.py index 58cdda5..b3ab7e5 100644 --- a/SlashBot.py +++ b/SlashBot.py @@ -137,7 +137,7 @@ if __name__ == '__main__': updater = Updater(token=Token, use_context=True, request_kwargs={'proxy_url': telegram_proxy}) delUsername = re.compile('@' + updater.bot.username, re.I).sub dp = updater.dispatcher - dp.add_handler(MessageHandler(Filters.regex(parser), reply)) + dp.add_handler(MessageHandler(Filters.regex(parser), reply, run_async=True)) updater.start_polling() updater.idle()