Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
BattlefieldDuck committed Oct 10, 2022
1 parent 86b5995 commit 1e58941
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions discordgsm/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 1e58941

Please sign in to comment.