Fix app_command_completion triggering on certain errors

This commit is contained in:
Rapptz
2022-08-16 19:57:44 -04:00
parent 7be0779b65
commit bd19ad05e7
3 changed files with 11 additions and 1 deletions

View File

@ -116,6 +116,9 @@ class Interaction:
A dictionary that can be used to store extraneous data for use during
interaction processing. The library will not touch any values or keys
within this dictionary.
command_failed: :class:`bool`
Whether the command associated with this interaction failed to execute.
This includes checks and execution.
"""
__slots__: Tuple[str, ...] = (
@ -132,6 +135,7 @@ class Interaction:
'locale',
'guild_locale',
'extras',
'command_failed',
'_permissions',
'_app_permissions',
'_state',
@ -155,6 +159,7 @@ class Interaction:
# an interaction. This is mainly for internal purposes and it gives it a free-for-all slot.
self._baton: Any = MISSING
self.extras: Dict[Any, Any] = {}
self.command_failed: bool = False
self._from_data(data)
def _from_data(self, data: InteractionPayload):