fix(tree): Correct logstack for acmpl.
This commit is contained in:
@@ -38,6 +38,7 @@ class LionTree(CommandTree):
|
|||||||
await self.error_reply(interaction, embed)
|
await self.error_reply(interaction, embed)
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.exception(f"Unhandled exception in interaction: {interaction}", extra={'action': 'TreeError'})
|
logger.exception(f"Unhandled exception in interaction: {interaction}", extra={'action': 'TreeError'})
|
||||||
|
if interaction.type is not InteractionType.autocomplete:
|
||||||
embed = self.bugsplat(interaction, error)
|
embed = self.bugsplat(interaction, error)
|
||||||
await self.error_reply(interaction, embed)
|
await self.error_reply(interaction, embed)
|
||||||
|
|
||||||
@@ -144,7 +145,10 @@ class LionTree(CommandTree):
|
|||||||
raise AppCommandError(
|
raise AppCommandError(
|
||||||
'This should not happen, but there is no focused element. This is a Discord bug.'
|
'This should not happen, but there is no focused element. This is a Discord bug.'
|
||||||
)
|
)
|
||||||
|
try:
|
||||||
await command._invoke_autocomplete(interaction, focused, namespace)
|
await command._invoke_autocomplete(interaction, focused, namespace)
|
||||||
|
except Exception as e:
|
||||||
|
await self.on_error(interaction, e)
|
||||||
return
|
return
|
||||||
|
|
||||||
set_logging_context(action=f"Run {command.qualified_name}")
|
set_logging_context(action=f"Run {command.qualified_name}")
|
||||||
|
|||||||
Reference in New Issue
Block a user