Skip to content

Commit

Permalink
fix missing modal handling
Browse files Browse the repository at this point in the history
  • Loading branch information
s0me-1 committed Aug 14, 2023
1 parent 194f4ac commit 4b4f505
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cogs/tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,15 @@ async def edit_urlfilters_channel(

modal_inter = await self._urlfilters_send_modal(inter, game_name, service_id, current_channel_filters, channel)

if not modal_inter:
emb_err.title = "❌ Modal Error"
emb_err.description = "Modal submission was not received."
try:
await inter.send(embed=emb_err)
except:
logger.warning(f"Failed to send modal error message to {inter.author.name} [{inter.author.id}]")
return

await modal_inter.response.defer()
emb_success = disnake.Embed(title="✅ Success", colour=6076508)
emb_success.description = f"URL filters for **{game_name}** [`{service_id}`] have been updated.\n" \
Expand Down

0 comments on commit 4b4f505

Please sign in to comment.