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

discord_bulk_overwrite_guild_application_commands() only takes single command #190

Open
gab462 opened this issue Feb 5, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@gab462
Copy link

gab462 commented Feb 5, 2025

In the case of discord_bulk_overwrite_global_application_commands() the function takes an array of struct discord_application_command paired with a size field as expected:

struct discord_application_commands {
    int size;
    struct discord_application_command *array;
    int realsize;
};

On the other hand, discord_bulk_overwrite_guild_application_commands() takes in a structure very similar to a plain struct discord_application_command:

struct discord_bulk_overwrite_guild_application_commands {
    u64snowflake id;
    char * name;
    struct strings * name_localizations;
    char * description;
    struct strings * description_localizations;
    struct discord_application_command_options * options;
 
    u64bitmask default_member_permissions;
 
    bool dm_permission;
    enum discord_application_command_types type;
};

It doesn't help that Discord's documentation of this endpoint is kind of confusing, but I'm pretty sure it should also be a list of commands as parameters.

@gab462 gab462 added the bug Something isn't working label Feb 5, 2025
@ThePedroo
Copy link
Contributor

Indeed, shortly I'll be committing a fix to update/gencodecs branch. Thank you!

@ThePedroo
Copy link
Contributor

9d5fa56 This should fix it, I'm testing it soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants