Skip to content

Commit a961d49

Browse files
authored
undo on_modal_error change
1 parent 62ffcdf commit a961d49

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

discord/client.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@
7575
from .poll import Poll
7676
from .soundboard import SoundboardSound
7777
from .ui.item import Item, ViewItem
78-
from .ui.modal import BaseModal
7978
from .voice_client import VoiceProtocol
8079

8180
__all__ = ("Client",)
@@ -574,7 +573,7 @@ async def on_view_error(
574573
)
575574

576575
async def on_modal_error(
577-
self, error: Exception, modal: BaseModal, interaction: Interaction
576+
self, error: Exception, interaction: Interaction
578577
) -> None:
579578
"""|coro|
580579
@@ -587,13 +586,11 @@ async def on_modal_error(
587586
----------
588587
error: :class:`Exception`
589588
The exception that was raised.
590-
modal: :class:`BaseModal`
591-
The modal that failed the dispatch.
592589
interaction: :class:`Interaction`
593590
The interaction that was received.
594591
"""
595592

596-
print(f"Ignoring exception in modal {modal}:", file=sys.stderr)
593+
print(f"Ignoring exception in modal {interaction.modal}:", file=sys.stderr)
597594
traceback.print_exception(
598595
error.__class__, error, error.__traceback__, file=sys.stderr
599596
)

0 commit comments

Comments
 (0)