Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
BattlefieldDuck committed Nov 3, 2023
1 parent 94477e5 commit 845f306
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 @@ -269,8 +269,6 @@ async def modal_on_submit(interaction: Interaction):
for item in params.values():
item.default = item._value = str(item._value).strip()

game_id, address, query_port = game['id'], str(query_param['host']), int(str(query_param['port']))

# Validate the port number
for key in params.keys():
if 'port' in key.lower() and not gamedig.is_port_valid(str(params[key])):
Expand All @@ -280,6 +278,8 @@ async def modal_on_submit(interaction: Interaction):

await interaction.response.defer(ephemeral=is_add_server, thinking=True)

game_id, address, query_port = game['id'], str(query_param['host']), int(str(query_param['port']))

# Check is the server already exists in database
if is_add_server:
try:
Expand Down

0 comments on commit 845f306

Please sign in to comment.