pycord icon indicating copy to clipboard operation
pycord copied to clipboard

walk_application_commands() return None if 1 command is not loaded

Open Lumabots opened this issue 1 year ago • 5 comments

Summary

walk_application_commands() return None if 1 command is not loaded

Reproduction Steps

Create a command that cant be added, and check the walk_application_commands()

Minimal Reproducible Code

@commands.slash_command()
    async def ping(self, ctx: LumabotContext, test: str = None):
        await ctx.respond(ctx.translator.bot.test.success.format(test=test))

    @commands.slash_command()
    async def ping(self, ctx: LumabotContext, test: str = None):
        await ctx.respond(ctx.translator.bot.test.success.format(test=test))

Expected Results

2024-06-20 08:08:09 [CRITICAL] : Error loading command: 400 Bad Request (error code: 50035): Invalid Form Body In 3.options.6: Option names are not unique in locale en-GB But then walk_application_commands should return all the commands excpet the one duplicate

Actual Results

walk_application_commands return None

Intents

all

System Information

2.5

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

cog.get_commands() also return None with that issue

Lumabots avatar Jun 20 '24 08:06 Lumabots

I don't understand, how many commands do you have? Why do you even have a duplicate?

Dorukyum avatar Jul 03 '24 11:07 Dorukyum

Should we really consider that even a bug? The only way to "fix" that in my eyes, is to throw lib side before sending, when there's a duplicate command name. Tho the dev should always know which command is named what..

~~nvm that the additional comment, i was tripping~~

Lulalaby avatar Jul 03 '24 11:07 Lulalaby

I don't understand, how many commands do you have? Why do you even have a duplicate?

its an example, the issue is more than if a command cant be loaded for any reason wrong name or anything else, it will then return 0 commandes for all the other commands

Lumabots avatar Jul 16 '24 20:07 Lumabots

Can I get assigned to this ?

Paillat-dev avatar Mar 27 '25 07:03 Paillat-dev

I will not pay you for overtime

Lulalaby avatar Mar 27 '25 08:03 Lulalaby

cant repro anymore

Lumabots avatar Oct 21 '25 08:10 Lumabots