Skip to content

Commit cf05dc2

Browse files
committed
Tickets - log NotFound exception
1 parent fd656df commit cf05dc2

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

tickets/common/views.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@ async def closeticket(self, interaction: Interaction, button: Button):
201201
modal = CloseReasonModal()
202202
try:
203203
await interaction.response.send_modal(modal)
204-
except discord.NotFound:
204+
except discord.NotFound as e:
205+
log.warning(f"Failed to send ticket modal for panel {panel_name}", exc_info=e)
205206
txt = _("Something went wrong, please try again.")
206207
try:
207208
await interaction.followup.send(txt, ephemeral=True)
@@ -334,14 +335,14 @@ async def create_ticket(self, interaction: Interaction):
334335
category = guild.get_channel(panel["category_id"]) if panel["category_id"] else None
335336
if not category:
336337
em = discord.Embed(
337-
description=_("The category for this support panel cannot be found!\n" "please contact an admin!"),
338+
description=_("The category for this support panel cannot be found!\nplease contact an admin!"),
338339
color=discord.Color.red(),
339340
)
340341
return await interaction.response.send_message(embed=em, ephemeral=True)
341342
if not isinstance(category, discord.CategoryChannel):
342343
em = discord.Embed(
343344
description=_(
344-
"The category for this support panel is not a category channel!\n" "please contact an admin!"
345+
"The category for this support panel is not a category channel!\nplease contact an admin!"
345346
),
346347
color=discord.Color.red(),
347348
)

tickets/tickets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ class Tickets(TicketCommands, Functions, commands.Cog, metaclass=CompositeMetaCl
3434
"""
3535

3636
__author__ = "[vertyco](https://github.com/vertyco/vrt-cogs)"
37-
__version__ = "2.9.12"
37+
__version__ = "2.9.13"
3838

3939
def format_help_for_context(self, ctx):
4040
helpcmd = super().format_help_for_context(ctx)
41-
info = f"{helpcmd}\n" f"Cog Version: {self.__version__}\n" f"Author: {self.__author__}\n"
41+
info = f"{helpcmd}\nCog Version: {self.__version__}\nAuthor: {self.__author__}\n"
4242
return info
4343

4444
async def red_delete_data_for_user(self, *, requester, user_id: int):

0 commit comments

Comments
 (0)