Concord - C Discord API library
A Discord API wrapper library written in C
|
Receiving and registering slash commands. More...
Data Structures | |
struct | discord_ret_application_command |
Request's return context. More... | |
struct | discord_ret_application_commands |
Request's return context. More... | |
struct | discord_ret_application_command_permission |
Request's return context. More... | |
struct | discord_ret_application_command_permissions |
Request's return context. More... | |
struct | discord_ret_guild_application_command_permissions |
Request's return context. More... | |
Receiving and registering slash commands.
CCORDcode discord_get_global_application_commands | ( | struct discord * | client, |
u64snowflake | application_id, | ||
struct discord_ret_application_commands * | ret | ||
) |
Fetch all of the global commands for your application.
client | the client created with discord_init() |
application_id | the unique id of the parent application |
ret | return context of the request. if successful a discord_application_commands will be sent over to its assigned done callback |
CCORDcode discord_create_global_application_command | ( | struct discord * | client, |
u64snowflake | application_id, | ||
struct discord_create_global_application_command * | params, | ||
struct discord_ret_application_command * | ret | ||
) |
Create a new global command.
client | the client created with discord_init() |
application_id | the unique id of the parent application |
params | request parameters |
ret | return context of the request. if successful a discord_application_command will be sent over to its assigned done callback |
CCORDcode discord_get_global_application_command | ( | struct discord * | client, |
u64snowflake | application_id, | ||
u64snowflake | command_id, | ||
struct discord_ret_application_command * | ret | ||
) |
Fetch a global command for your application.
client | the client created with discord_init() |
application_id | the unique id of the parent application |
command_id | the registered command id |
ret | return context of the request. if successful a discord_application_command will be sent over to its assigned done callback |
CCORDcode discord_edit_global_application_command | ( | struct discord * | client, |
u64snowflake | application_id, | ||
u64snowflake | command_id, | ||
struct discord_edit_global_application_command * | params, | ||
struct discord_ret_application_command * | ret | ||
) |
Edit a global command.
client | the client created with discord_init() |
application_id | the unique id of the parent application |
command_id | the registered command id |
params | request parameters |
ret | return context of the request. if successful a discord_application_command will be sent over to its assigned done callback |
CCORDcode discord_delete_global_application_command | ( | struct discord * | client, |
u64snowflake | application_id, | ||
u64snowflake | command_id, | ||
struct discord_ret * | ret | ||
) |
Deletes a global command.
client | the client created with discord_init() |
application_id | the unique id of the parent application |
command_id | the registered command id |
ret | return context of the request. if successful the assigned done will be triggered |
CCORDcode discord_bulk_overwrite_global_application_commands | ( | struct discord * | client, |
u64snowflake | application_id, | ||
struct discord_application_commands * | params, | ||
struct discord_ret_application_commands * | ret | ||
) |
Overwrite existing global application commands.
client | the client created with discord_init() |
application_id | the unique id of the parent application |
params | the request parameters, a list of application commands |
ret | return context of the request. if successful a discord_application_commands will be sent over to its assigned done callback |
CCORDcode discord_get_guild_application_commands | ( | struct discord * | client, |
u64snowflake | application_id, | ||
u64snowflake | guild_id, | ||
struct discord_ret_application_commands * | ret | ||
) |
Fetch all of the guild commands of a given guild.
client | the client created with discord_init() |
application_id | the unique id of the parent application |
guild_id | the guild where the commands are located |
ret | return context of the request. if successful a discord_application_commands will be sent over to its assigned done callback |
CCORDcode discord_create_guild_application_command | ( | struct discord * | client, |
u64snowflake | application_id, | ||
u64snowflake | guild_id, | ||
struct discord_create_guild_application_command * | params, | ||
struct discord_ret_application_command * | ret | ||
) |
Create a new guild command.
client | the client created with discord_init() |
application_id | the unique id of the parent application |
guild_id | the guild where the command is located |
params | request parameters |
ret | return context of the request. if successful a discord_application_command will be sent over to its assigned done callback |
CCORDcode discord_get_guild_application_command | ( | struct discord * | client, |
u64snowflake | application_id, | ||
u64snowflake | guild_id, | ||
u64snowflake | command_id, | ||
struct discord_ret_application_command * | ret | ||
) |
Fetch a guild command for your application.
client | the client created with discord_init() |
application_id | the unique id of the parent application |
guild_id | the guild where the command is located |
command_id | the registered command id |
ret | return context of the request. if successful a discord_application_command will be sent over to its assigned done callback |
CCORDcode discord_edit_guild_application_command | ( | struct discord * | client, |
u64snowflake | application_id, | ||
u64snowflake | guild_id, | ||
u64snowflake | command_id, | ||
struct discord_edit_guild_application_command * | params, | ||
struct discord_ret_application_command * | ret | ||
) |
Edit a guild command.
client | the client created with discord_init() |
application_id | the unique id of the parent application |
guild_id | the guild where the command is located |
command_id | the registered command id |
params | request parameters |
ret | return context of the request. if successful a discord_application_command will be sent over to its assigned done callback |
CCORDcode discord_delete_guild_application_command | ( | struct discord * | client, |
u64snowflake | application_id, | ||
u64snowflake | guild_id, | ||
u64snowflake | command_id, | ||
struct discord_ret * | ret | ||
) |
Deletes a guild command.
client | the client created with discord_init() |
application_id | the unique id of the parent application |
guild_id | the guild where the command is located |
command_id | the registered command id |
ret | return context of the request. if successful the assigned done will be triggered |
CCORDcode discord_bulk_overwrite_guild_application_commands | ( | struct discord * | client, |
u64snowflake | application_id, | ||
u64snowflake | guild_id, | ||
struct discord_bulk_overwrite_guild_application_commands * | params, | ||
struct discord_ret_application_commands * | ret | ||
) |
Overwrite existing guild application commands.
client | the client created with discord_init() |
application_id | the unique id of the parent application |
guild_id | the guild where the commands are located |
params | the request parameters, a list of application commands |
ret | return context of the request. if successful a discord_application_commands will be sent over to its assigned done callback |
CCORDcode discord_get_guild_application_command_permissions | ( | struct discord * | client, |
u64snowflake | application_id, | ||
u64snowflake | guild_id, | ||
struct discord_ret_guild_application_command_permissions * | ret | ||
) |
Fetches command permissions for all commands in a given guild.
client | the client created with discord_init() |
application_id | the unique id of the parent application |
guild_id | the guild where the commands are located |
ret | return context of the request. if successful a discord_guild_application_command_permissions will be sent over to its assigned done callback |
CCORDcode discord_get_application_command_permissions | ( | struct discord * | client, |
u64snowflake | application_id, | ||
u64snowflake | guild_id, | ||
u64snowflake | command_id, | ||
struct discord_ret_application_command_permission * | ret | ||
) |
Fetches command permissions for a specific command in a given guild.
client | the client created with discord_init() |
application_id | the unique id of the parent application |
guild_id | the guild where the command is located |
command_id | the registered command id |
ret | return context of the request. if successful a discord_application_command_permissions will be sent over to its assigned done callback |