mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 09:56:09 +00:00
Add error handler support for context menus
This commit is contained in:
@ -963,6 +963,8 @@ class CommandTree(Generic[ClientT]):
|
||||
try:
|
||||
await ctx_menu._invoke(interaction, value)
|
||||
except AppCommandError as e:
|
||||
if ctx_menu.on_error is not None:
|
||||
await ctx_menu.on_error(interaction, e)
|
||||
await self.on_error(interaction, ctx_menu, e)
|
||||
|
||||
async def call(self, interaction: Interaction) -> None:
|
||||
|
Reference in New Issue
Block a user