mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-11 04:17:58 +00:00
Revert "Run parent command checks before calling autocomplete callback"
This reverts commit 5e98626d41e6e39f82b9fbdc7a0723311fe5751b. Fix #7978
This commit is contained in:
parent
0551214be1
commit
5f0cf58b2e
@ -677,19 +677,6 @@ class Command(Generic[GroupT, P, T]):
|
|||||||
if param.autocomplete is None:
|
if param.autocomplete is None:
|
||||||
raise CommandSignatureMismatch(self)
|
raise CommandSignatureMismatch(self)
|
||||||
|
|
||||||
try:
|
|
||||||
if not await self._check_can_run(interaction):
|
|
||||||
if not interaction.response.is_done():
|
|
||||||
await interaction.response.autocomplete([])
|
|
||||||
return
|
|
||||||
except AppCommandError:
|
|
||||||
# Exceptions can't reasonably be handled by the developer at this point
|
|
||||||
# The autocomplete can either fail or return an empty list of options
|
|
||||||
# Both of these are more or less the same UX to the user.
|
|
||||||
if not interaction.response.is_done():
|
|
||||||
await interaction.response.autocomplete([])
|
|
||||||
return
|
|
||||||
|
|
||||||
if param.autocomplete.requires_binding:
|
if param.autocomplete.requires_binding:
|
||||||
binding = param.autocomplete.binding or self.binding
|
binding = param.autocomplete.binding or self.binding
|
||||||
if binding is not None:
|
if binding is not None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user