Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove on_error from classes in views: #25

Merged
merged 3 commits into from
Nov 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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