Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

walk_application_commands() return None if 1 command is not loaded #2479

Open
3 tasks done
Lumabots opened this issue Jun 20, 2024 · 3 comments
Open
3 tasks done

walk_application_commands() return None if 1 command is not loaded #2479

Lumabots opened this issue Jun 20, 2024 · 3 comments
Labels
unconfirmed bug A bug report that needs triaging

Comments

@Lumabots
Copy link

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

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

Additional Context

cog.get_commands() also return None with that issue

@Lumabots Lumabots added the unconfirmed bug A bug report that needs triaging label Jun 20, 2024
@Dorukyum
Copy link
Member

Dorukyum commented Jul 3, 2024

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

@Lulalaby
Copy link
Member

Lulalaby commented Jul 3, 2024

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

@Lumabots
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unconfirmed bug A bug report that needs triaging
Projects
None yet
Development

No branches or pull requests

3 participants