Skip to content

Commit

Permalink
Remove on_error from classes on views: (#25)
Browse files Browse the repository at this point in the history
- This is in favor of default discord logger that has been implemented in main bot.
  • Loading branch information
Jerrie-Aries authored Nov 26, 2023
1 parent c48da76 commit fa04fd7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
6 changes: 0 additions & 6 deletions rolemanager/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ async def on_submit(self, interaction: Interaction) -> None:

await self.followup_callback(interaction, self)

async def on_error(self, interaction: Interaction, error: Exception) -> None:
logger.error("Ignoring exception in modal %r:", self, exc_info=error)


class Select(ui.Select):
def __init__(self, category: str, *, options: List[discord.SelectOption], callback: Callback, **kwargs):
Expand Down Expand Up @@ -102,9 +99,6 @@ def __init__(
self.cog: RoleManager = cog
super().__init__(timeout=timeout)

async def on_error(self, interaction: Interaction, error: Exception, item: Any) -> None:
logger.error("Ignoring exception in view %r for item %r", self, item, exc_info=error)

def refresh(self) -> None:
pass

Expand Down
6 changes: 0 additions & 6 deletions supportutils/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ async def on_submit(self, interaction: Interaction) -> None:
self.view.interaction = interaction
await self.followup_callback(interaction, self)

async def on_error(self, interaction: Interaction, error: Exception) -> None:
logger.error("Ignoring exception in modal %r:", self, exc_info=error)


class DropdownMenu(ui.Select):
def __init__(self, *, options: List[discord.SelectOption], **kwargs):
Expand Down Expand Up @@ -86,9 +83,6 @@ def __init__(
self.cog: SupportUtility = cog
self.bot: ModmailBot = cog.bot

async def on_error(self, interaction: Interaction, error: Exception, item: Any) -> None:
logger.error("Ignoring exception in view %r for item %r", self, item, exc_info=error)

async def interaction_check(self, interaction: discord.Interaction) -> bool:
raise NotImplementedError

Expand Down

0 comments on commit fa04fd7

Please sign in to comment.