Browse Source

Add guild and user context to autocomplete logs

pull/10406/head
Michael 4 months ago
committed by GitHub
parent
commit
46000f78c7
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 7
      discord/app_commands/tree.py

7
discord/app_commands/tree.py

@ -1289,7 +1289,12 @@ class CommandTree(Generic[ClientT]):
await command._invoke_autocomplete(interaction, focused, namespace)
except Exception:
# Suppress exception since it can't be handled anyway.
_log.exception('Ignoring exception in autocomplete for %r', command.qualified_name)
_log.exception(
'Ignoring exception in autocomplete for %r (Guild: %s, User: %s)',
command.qualified_name,
interaction.guild_id,
interaction.user.id,
)
return

Loading…
Cancel
Save