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.
In the case of
discord_bulk_overwrite_global_application_commands()the function takes an array ofstruct discord_application_commandpaired with asizefield as expected:On the other hand,
discord_bulk_overwrite_guild_application_commands()takes in a structure very similar to a plainstruct discord_application_command: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.