Open helish88 opened 2 years ago
checks doesn't work for autocompleters, they works only after I selected something from the list
I run the command
import disnake from disnake.ext import commands LANGUAGES = ["python", "javascript", "typescript", "java", "rust", "lisp", "elixir"] def test_check(): async def predicate(inter: disnake.ApplicationCommandInteraction): if inter.user.id == 177494227918389249: return True return False return commands.check(predicate) # type: ignore class DisnakeIssue(commands.Cog): def __init__(self, bot): self.bot = bot @commands.slash_command() @commands.has_permissions(manage_guild=True) @test_check() async def languages( self, inter: disnake.ApplicationCommandInteraction, language: str ): pass @languages.autocomplete("language") async def language_autocomp( self, inter: disnake.ApplicationCommandInteraction, string: str ): string = string.lower() return [lang for lang in LANGUAGES if string in lang.lower()] def setup(bot): bot.add_cog(DisnakeIssue(bot)) print("DisnakeIssue is loaded.")
I should get error before I select something from this list, before I ran the command
I get an error only after I select something from the list
disnake.Intents.all()
- Python v3.8.10-final - disnake v2.5.1-final - disnake pkg_resources: v2.5.1 - aiohttp v3.7.4.post0 - system info: Windows 10 10.0.17763
https://discord.com/channels/808030843078836254/883342278280745030/984787279530848307
Confirmed this is a bug, thanks for reporting!
After 2 years? Really? Omg 😂😂😂😂😂
Summary
checks doesn't work for autocompleters, they works only after I selected something from the list
Reproduction Steps
I run the command
Minimal Reproducible Code
Expected Results
I should get error before I select something from this list, before I ran the command
Actual Results
I get an error only after I select something from the list
Intents
disnake.Intents.all()
System Information
Checklist
Additional Context
https://discord.com/channels/808030843078836254/883342278280745030/984787279530848307