Cogmasters / concord

A Discord API wrapper library made in C
https://cogmasters.github.io/concord/
MIT License
523 stars 30 forks source link

Cannot create message or user commands #179

Open ArthaTi opened 2 months ago

ArthaTi commented 2 months ago

Describe the bug

Concord discord_create_global_application_command erroneously rejects requests early if the description field is empty, which prevents user (type 2) and message (type 3) commands from being created.

https://github.com/Cogmasters/concord/blob/master/src/application_command.c#L40

Expected behavior

User and message commands must not have "description" provided, as per Discord spec:

The description field is not allowed when creating message commands. However, to avoid breaking changes to data models, description will be an empty string (instead of null) when fetching commands.

https://discord.com/developers/docs/interactions/application-commands#message-commands

Version

769bdb74b066b2f250a3ec9199063532e4dcccf2

ThePedroo commented 2 months ago

Will take a further look, but it seems like yeah, Concord is wrong

ThePedroo commented 2 months ago

Take a look in https://github.com/Cogmasters/concord/commit/aebc646a135f9d7301195444f742fea874d1075f