After trying to make a series of commands under a sub command group I ran into an issue regarding the group asking for positional arguments which it shouldn't require
Reproduction Steps
class ConfigCommands(commands.Cog):
def init(self, client: commands.Bot):
self.client = client
The expected result is for it to not error when I run the commands under the panel sub command group.
Actual Results
Traceback (most recent call last):
File "F:\Comissions\Monkee\lib\site-packages\disnake\client.py", line 515, in _run_event
await coro(*args, **kwargs)
File "F:\Discord Bots\Monkee\cogs\error_handler.py", line 50, in on_slash_command_error
raise error
File "F:\Comissions\Monkee\lib\site-packages\disnake\ext\commands\base_core.py", line 285, in invoke
await self(inter, *args, **kwargs)
File "F:\Comissions\Monkee\lib\site-packages\disnake\ext\commands\base_core.py", line 188, in __call__
return await self.callback(self.cog, interaction, *args, **kwargs)
TypeError: ConfigCommands.panel() takes 1 positional argument but 2 were given
Intents
messages, guilds, members, reactions, bans
System Information
Python v3.10.0-final
disnake v2.3.0-beta
disnake pkg_resources: v2.3.0
aiohttp v3.7.4.post0
Checklist
[X] I have searched the open issues for duplicates.
[X] I have shown the entire traceback, if possible.
[X] I have removed my token from display, if visible.
Additional Context
After asking in the support discord I was told to make a bug report here.
async def panel(self) is missing 1 positional argument representing the interaction. async def panel(self, inter) should work. Let me know if this solves your problem.
Summary
After trying to make a series of commands under a sub command group I ran into an issue regarding the group asking for positional arguments which it shouldn't require
Reproduction Steps
class ConfigCommands(commands.Cog): def init(self, client: commands.Bot): self.client = client
def setup(client): client.add_cog(ConfigCommands(client))
Minimal Reproducible Code
No response
Expected Results
The expected result is for it to not error when I run the commands under the
panel
sub command group.Actual Results
Intents
messages, guilds, members, reactions, bans
System Information
Checklist
Additional Context
After asking in the support discord I was told to make a bug report here.