mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-07 18:33:02 +00:00
Mark public callbacks as positional-only
This commit is contained in:
@ -134,7 +134,7 @@ class Modal(View):
|
||||
|
||||
super().__init__(timeout=timeout)
|
||||
|
||||
async def on_submit(self, interaction: Interaction) -> None:
|
||||
async def on_submit(self, interaction: Interaction, /) -> None:
|
||||
"""|coro|
|
||||
|
||||
Called when the modal is submitted.
|
||||
@ -146,7 +146,7 @@ class Modal(View):
|
||||
"""
|
||||
pass
|
||||
|
||||
async def on_error(self, interaction: Interaction, error: Exception) -> None:
|
||||
async def on_error(self, interaction: Interaction, error: Exception, /) -> None:
|
||||
"""|coro|
|
||||
|
||||
A callback that is called when :meth:`on_submit`
|
||||
|
@ -357,7 +357,7 @@ class View:
|
||||
self.__weights.clear()
|
||||
return self
|
||||
|
||||
async def interaction_check(self, interaction: Interaction) -> bool:
|
||||
async def interaction_check(self, interaction: Interaction, /) -> bool:
|
||||
"""|coro|
|
||||
|
||||
A callback that is called when an interaction happens within the view
|
||||
@ -392,7 +392,7 @@ class View:
|
||||
"""
|
||||
pass
|
||||
|
||||
async def on_error(self, interaction: Interaction, error: Exception, item: Item[Any]) -> None:
|
||||
async def on_error(self, interaction: Interaction, error: Exception, item: Item[Any], /) -> None:
|
||||
"""|coro|
|
||||
|
||||
A callback that is called when an item's callback or :meth:`interaction_check`
|
||||
|
Reference in New Issue
Block a user