mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-20 13:29:03 +00:00
Add error handler support for context menus
This commit is contained in:
1 parent
97fe07edb2
commit
f7c664e3e2
2 files changed
+32
-1
No files matched your search
@@ -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