Skip to content

Commit 44757e3

Browse files
committed
📝 Add docs to on_view_error and on_modal_error events thigny
1 parent 60fa71a commit 44757e3

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

discord/client.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,15 @@ async def on_view_error(
553553
The default view error handler provided by the client.
554554
555555
This only fires for a view if you did not define its :func:`~discord.ui.View.on_error`.
556+
557+
Parameters
558+
----------
559+
error: :class:`Exception`
560+
The exception that was raised.
561+
item: :class:`Item`
562+
The item that the user interacted with.
563+
interaction: :class:`Interaction`
564+
The interaction that was received.
556565
"""
557566

558567
print(
@@ -570,6 +579,13 @@ async def on_modal_error(self, error: Exception, interaction: Interaction) -> No
570579
The default implementation prints the traceback to stderr.
571580
572581
This only fires for a modal if you did not define its :func:`~discord.ui.Modal.on_error`.
582+
583+
Parameters
584+
----------
585+
error: :class:`Exception`
586+
The exception that was raised.
587+
interaction: :class:`Interaction`
588+
The interaction that was received.
573589
"""
574590

575591
print(f"Ignoring exception in modal {interaction.modal}:", file=sys.stderr)

0 commit comments

Comments
 (0)