From 1e58941c6990d495522d623291626ea1cc9c141d Mon Sep 17 00:00:00 2001 From: Battlefield Duck Date: Tue, 11 Oct 2022 06:28:53 +0800 Subject: [PATCH] Update main.py --- discordgsm/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/discordgsm/main.py b/discordgsm/main.py index 683a5cb..bad83d2 100644 --- a/discordgsm/main.py +++ b/discordgsm/main.py @@ -217,8 +217,8 @@ async def modal_on_submit(interaction: Interaction): try: server = database.add_server(server) except database.ServerNotFoundError as e: - await interaction.followup.send(f'Fail to add the server `{host}:{port}`. Please try again.') Logger.error(f'Fail to add the server {host}:{port} {e}') + await interaction.followup.send(f'Fail to add the server `{host}:{port}`. Please try again later.') return await refresh_channel_messages(interaction, resend=True) @@ -638,7 +638,7 @@ async def query_servers(): for chunks in to_chunks(distinct_servers, 45): with ThreadPoolExecutor() as executor: result = await asyncio.get_event_loop().run_in_executor(executor, query_servers_func, chunks) - + servers.extend(result[0]) success += result[1] failed += result[2]