concord icon indicating copy to clipboard operation
concord copied to clipboard

discord_bulk_overwrite_guild_application_commands() only takes single command

Open gab462 opened this issue 10 months ago • 2 comments

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 avatar Feb 05 '25 17:02 gab462

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

ThePedroo avatar Feb 07 '25 15:02 ThePedroo

https://github.com/Cogmasters/concord/commit/9d5fa56a1afbc12e0b1b4c4d3629fbbd1fca75b9 This should fix it, I'm testing it soon

ThePedroo avatar Feb 16 '25 22:02 ThePedroo