Concord - C Discord API library
A Discord API wrapper library written in C
|
Guild's public API supported by Concord. More...
Modules | |
System channel flags | |
Data Structures | |
struct | discord_ret_guild |
Request's return context. More... | |
struct | discord_ret_guilds |
Request's return context. More... | |
struct | discord_ret_guild_preview |
Request's return context. More... | |
struct | discord_ret_guild_member |
Request's return context. More... | |
struct | discord_ret_guild_members |
Request's return context. More... | |
struct | discord_ret_guild_widget |
Request's return context. More... | |
struct | discord_ret_guild_widget_settings |
Request's return context. More... | |
struct | discord_ret_ban |
Request's return context. More... | |
struct | discord_ret_bans |
Request's return context. More... | |
struct | discord_ret_role |
Request's return context. More... | |
struct | discord_ret_roles |
Request's return context. More... | |
struct | discord_ret_welcome_screen |
Request's return context. More... | |
struct | discord_ret_integrations |
Request's return context. More... | |
struct | discord_ret_prune_count |
Request's return context. More... | |
Guild's public API supported by Concord.
CCORDcode discord_create_guild | ( | struct discord * | client, |
struct discord_create_guild * | params, | ||
struct discord_ret_guild * | ret | ||
) |
Create a new guild.
Guild Create
eventclient | the client created with discord_init() |
params | request parameters |
ret | return context of the request. if successful a discord_guild will be sent over to its assigned done callback |
CCORDcode discord_get_guild | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_ret_guild * | ret | ||
) |
Get the guild with given id.
client | the client created with discord_init() |
guild_id | the unique id of the guild to retrieve |
ret | return context of the request. if successful a discord_guild will be sent over to its assigned done callback |
CCORDcode discord_get_guild_preview | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_ret_guild_preview * | ret | ||
) |
Get the preview for the given guild.
client | the client created with discord_init() |
guild_id | guild to get preview from |
ret | return context of the request. if successful a discord_guild_preview will be sent over to its assigned done callback |
CCORDcode discord_modify_guild | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_modify_guild * | params, | ||
struct discord_ret_guild * | ret | ||
) |
Modify a guild's settings.
Guild Update
eventclient | the client created with discord_init() |
guild_id | the unique id of the guild to modify |
params | request parameters |
ret | return context of the request. if successful a discord_guild will be sent over to its assigned done callback |
CCORDcode discord_delete_guild | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_ret * | ret | ||
) |
Delete a guild permanently, user must be owner.
Guild Delete
eventclient | the client created with discord_init() |
guild_id | id of guild to delete |
ret | return context of the request. if successful the assigned done will be triggered |
CCORDcode discord_get_guild_channels | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_ret_channels * | ret | ||
) |
Fetch channels from given guild. Does not include threads.
client | the client created with discord_init() |
guild_id | id of guild to fetch channels from |
ret | return context of the request. if successful a discord_channels will be sent over to its assigned done callback |
CCORDcode discord_create_guild_channel | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_create_guild_channel * | params, | ||
struct discord_ret_channel * | ret | ||
) |
Create a new guild channel.
Channel Create
eventclient | the client created with discord_init() |
guild_id | id of the guild to create a channel at |
params | request parameters |
ret | return context of the request. if successful a discord_channel will be sent over to its assigned done callback |
CCORDcode discord_modify_guild_channel_positions | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_modify_guild_channel_positions * | params, | ||
struct discord_ret * | ret | ||
) |
Modify guild channel positions.
client | the client created with discord_init() |
guild_id | the unique id of the guild to change the positions of the channels in |
params | request parameters |
ret | return context of the request. if successful the assigned done will be triggered |
CCORDcode discord_get_guild_member | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
u64snowflake | user_id, | ||
struct discord_ret_guild_member * | ret | ||
) |
Get guild member of a guild from given user id.
client | the client created with discord_init() |
guild_id | guild the member belongs to |
user_id | unique user id of member |
ret | return context of the request. if successful a discord_guild_member will be sent over to its assigned done callback |
CCORDcode discord_list_guild_members | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_list_guild_members * | params, | ||
struct discord_ret_guild_members * | ret | ||
) |
Get guild members of a guild.
client | the client created with discord_init() |
guild_id | guild the members belongs to |
request | parameters |
ret | return context of the request. if successful a discord_guild_members will be sent over to its assigned done callback |
CCORDcode discord_search_guild_members | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_search_guild_members * | params, | ||
struct discord_ret_guild_members * | ret | ||
) |
Get guild members whose username or nickname starts with a provided string.
client | the client created with discord_init() |
guild_id | guild the members belongs to |
request | parameters |
ret | return context of the request. if successful a discord_guild_members will be sent over to its assigned done callback |
CCORDcode discord_add_guild_member | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
u64snowflake | user_id, | ||
struct discord_add_guild_member * | params, | ||
struct discord_ret_guild_member * | ret | ||
) |
Adds a user to the guild.
guilds.join
scope Guild Member Add
event client | the client created with discord_init() |
guild_id | guild to add the member to |
user_id | the user to be added |
request | parameters |
ret | return context of the request. if successful a discord_guild_member will be sent over to its assigned done callback |
CCORDcode discord_modify_guild_member | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
u64snowflake | user_id, | ||
struct discord_modify_guild_member * | params, | ||
struct discord_ret_guild_member * | ret | ||
) |
Modify retibutes of a guild member.
Guild Member Update
event client | the client created with discord_init() |
guild_id | guild the member belongs to |
user_id | the user id of member |
request | parameters |
ret | return context of the request. if successful a discord_guild_member will be sent over to its assigned done callback |
CCORDcode discord_modify_current_member | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_modify_current_member * | params, | ||
struct discord_ret_guild_member * | ret | ||
) |
Modifies the current member in the guild.
Guild Member Update
eventclient | the client created with discord_init() |
guild_id | the unique id of the guild where the member exists |
params | request parameters |
ret | return context of the request. if successful a discord_guild_member will be sent over to its assigned done callback |
CCORDcode discord_modify_current_user_nick | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_modify_current_user_nick * | params, | ||
struct discord_ret_guild_member * | ret | ||
) |
Modify the nickname of the current user in a guild.
Guild Member Update
eventclient | the client created with discord_init() |
guild_id | guild the member belongs to |
params | request parameters |
ret | return context of the request. if successful a discord_guild_member will be sent over to its assigned done callback |
CCORDcode discord_add_guild_member_role | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
u64snowflake | user_id, | ||
u64snowflake | role_id, | ||
struct discord_add_guild_member_role * | params, | ||
struct discord_ret * | ret | ||
) |
Adds a role to a guild member.
Guild Member Update
eventclient | the client created with discord_init() |
guild_id | the unique id of the guild where the member exists |
user_id | the unique id of the user |
role_id | the unique id of the role to be added |
params | request parameters |
ret | return context of the request. if successful the assigned done will be triggered |
CCORDcode discord_remove_guild_member_role | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
u64snowflake | user_id, | ||
u64snowflake | role_id, | ||
struct discord_remove_guild_member_role * | params, | ||
struct discord_ret * | ret | ||
) |
Removes a role from a guild member.
Guild Member Update
eventclient | the client created with discord_init() |
guild_id | the unique id of the guild where the member exists |
user_id | the unique id of the user |
role_id | the unique id of the role to be removed |
params | request parameters |
ret | return context of the request. if successful the assigned done will be triggered |
CCORDcode discord_remove_guild_member | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
u64snowflake | user_id, | ||
struct discord_remove_guild_member * | params, | ||
struct discord_ret * | ret | ||
) |
Remove a member from a guild.
Guild Member Update
eventclient | the client created with discord_init() |
guild_id | the guild to remove the member from |
user_id | the user to be removed |
params | request parameters |
ret | return context of the request. if successful the assigned done will be triggered |
CCORDcode discord_get_guild_bans | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_ret_bans * | ret | ||
) |
Fetch banned users for given guild.
client | the client created with discord_init() |
guild_id | the guild to get the list from |
ret | return context of the request. if successful a discord_bans will be sent over to its assigned done callback |
CCORDcode discord_get_guild_ban | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
u64snowflake | user_id, | ||
struct discord_ret_ban * | ret | ||
) |
Fetch banned user from given guild.
client | the client created with discord_init() |
guild_id | the guild to return the ban from |
user_id | the user that is banned |
ret | return context of the request. if successful a discord_ban will be sent over to its assigned done callback |
CCORDcode discord_create_guild_ban | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
u64snowflake | user_id, | ||
struct discord_create_guild_ban * | params, | ||
struct discord_ret * | ret | ||
) |
Bans user from a given guild.
Guild Ban Add
eventclient | the client created with discord_init() |
guild_id | guild the user belongs to |
user_id | the user to be banned |
params | request parameters |
ret | return context of the request. if successful the assigned done will be triggered |
CCORDcode discord_remove_guild_ban | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
u64snowflake | user_id, | ||
struct discord_remove_guild_ban * | params, | ||
struct discord_ret * | ret | ||
) |
Remove the ban for a user.
Guild Ban Remove
eventclient | the client created with discord_init() |
guild_id | guild the user belonged to |
user_id | the user to have its ban revoked |
params | request parameters |
ret | return context of the request. if successful the assigned done will be triggered |
CCORDcode discord_get_guild_roles | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_ret_roles * | ret | ||
) |
Get guild roles.
client | the client created with discord_init() |
guild_id | guild to get roles from |
ret | return context of the request. if successful a discord_roles will be sent over to its assigned done callback |
CCORDcode discord_create_guild_role | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_create_guild_role * | params, | ||
struct discord_ret_role * | ret | ||
) |
Create a new guild role.
Guild Role Create
eventclient | the client created with discord_init() |
guild_id | guild to add a role to |
params | request parameters |
ret | return context of the request. if successful a discord_role will be sent over to its assigned done callback |
CCORDcode discord_get_guild_prune_count | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_get_guild_prune_count * | params, | ||
struct discord_ret_prune_count * | ret | ||
) |
Returns the number of members that would be removed in a prune operation.
params.include_roles
valueclient | the client created with discord_init() |
guild_id | the unique id of the guild to be checked |
params | request parameters |
ret | return context of the request. if successful a discord_prune_count will be sent over to its assigned done callback |
CCORDcode discord_begin_guild_prune | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_begin_guild_prune * | params, | ||
struct discord_ret * | ret | ||
) |
Begin guild prune operation.
Guild Member Remove
eventsclient | the client created with discord_init() |
guild_id | the unique id of the guild to start the prune |
params | request parameters |
ret | return context of the request. if successful the assigned done will be triggered |
CCORDcode discord_get_guild_voice_regions | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_ret_voice_regions * | ret | ||
) |
Get voice regions (includes VIP servers when the guild is VIP-enabled)
client | the client created with discord_init() |
guild_id | the unique id of the guild to get voice regions from |
ret | return context of the request. if successful a discord_voice_regions will be sent over to its assigned done callback |
CCORDcode discord_get_guild_invites | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_ret_invites * | ret | ||
) |
Get guild invites.
MANAGE_GUILD
permissionclient | the client created with discord_init() |
guild_id | the unique id of the guild to get invites from |
ret | return context of the request. if successful a discord_invites will be sent over to its assigned done callback |
CCORDcode discord_get_guild_integrations | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_ret_integrations * | ret | ||
) |
Get guild integrations.
MANAGE_GUILD
permissionclient | the client created with discord_init() |
guild_id | the unique id of the guild to get integrations from |
ret | return context of the request. if successful a discord_integrations will be sent over to its assigned done callback |
CCORDcode discord_delete_guild_integrations | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
u64snowflake | integration_id, | ||
struct discord_delete_guild_integrations * | params, | ||
struct discord_ret * | ret | ||
) |
Deletes the integration for the guild. It will also delete any associated webhooks and bots.
Guild Integrations Update
eventclient | the client created with discord_init() |
guild_id | the unique id of the guild to delete the integrations from |
integration_id | the id of the integration to delete |
params | request parameters |
ret | return context of the request. if successful the assigned done will be triggered |
CCORDcode discord_get_guild_widget_settings | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_ret_guild_widget_settings * | ret | ||
) |
Get a guild widget settings.
MANAGE_GUILD
permissionclient | the client created with discord_init() |
guild_id | the unique id of the guild to get widget settings from |
ret | return context of the request. if successful a discord_guild_widget_settings will be sent over to its assigned done callback |
CCORDcode discord_modify_guild_widget | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_guild_widget_settings * | params, | ||
struct discord_ret_guild_widget_settings * | ret | ||
) |
Modify a guild widget settings.
MANAGE_GUILD
permissionclient | the client created with discord_init() |
guild_id | the unique id of the guild to modify the widget settings from |
param | request parameters |
ret | return context of the request. if successful a discord_guild_widget_settings will be sent over to its assigned done callback |
CCORDcode discord_get_guild_widget | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_ret_guild_widget * | ret | ||
) |
Get the widget for the guild.
client | the client created with discord_init() |
guild_id | the unique id of the guild to get the widget from |
ret | return context of the request. if successful a discord_guild_widget will be sent over to its assigned done callback |
CCORDcode discord_get_guild_vanity_url | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_ret_invite * | ret | ||
) |
Get invite from a given guild.
client | the client created with discord_init() |
guild_id | the unique id of the guild to get vanity url from |
ret | return context of the request. if successful a discord_invite will be sent over to its assigned done callback |
CCORDcode discord_get_guild_welcome_screen | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_ret_welcome_screen * | ret | ||
) |
Get the Welcome Screen for the guild.
client | the client created with discord_init() |
guild_id | the unique id of the guild to get welcome screen of |
ret | return context of the request. if successful a discord_welcome_screen will be sent over to its assigned done callback |
CCORDcode discord_modify_guild_welcome_screen | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_modify_guild_welcome_screen * | params, | ||
struct discord_ret_welcome_screen * | ret | ||
) |
Modify the Welcome Screen for the guild.
MANAGE_GUILD
permissionclient | the client created with discord_init() |
guild_id | the unique id of the guild to modify welcome screen of |
params | request parameters |
ret | return context of the request. if successful a discord_welcome_screen will be sent over to its assigned done callback |
CCORDcode discord_modify_current_user_voice_state | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_modify_current_user_voice_state * | params, | ||
struct discord_ret * | ret | ||
) |
Updates the current user's voice state.
client | the client created with discord_init() |
guild_id | the unique id of the guild to modify the current user's voice state |
params | request parameters |
ret | return context of the request. if successful the assigned done will be triggered |
CCORDcode discord_modify_user_voice_state | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
u64snowflake | user_id, | ||
struct discord_modify_user_voice_state * | params, | ||
struct discord_ret * | ret | ||
) |
Updates user's voice state.
client | the client created with discord_init() |
guild_id | the unique id of the guild to modify the user's voice state |
user_id | the unique id of user to have its voice state modified |
params | request parameters |
ret | return context of the request. if successful the assigned done will be triggered |
CCORDcode discord_modify_guild_role_positions | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
struct discord_modify_guild_role_positions * | params, | ||
struct discord_ret_roles * | ret | ||
) |
Modify the positions of a given role list for the guild.
Guild Role Update
eventsclient | the client created with discord_init() |
guild_id | the unique id of the guild to get welcome screen of |
params | request parameters |
ret | return context of the request. if successful a discord_roles will be sent over to its assigned done callback |
CCORDcode discord_modify_guild_role | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
u64snowflake | role_id, | ||
struct discord_modify_guild_role * | params, | ||
struct discord_ret_role * | ret | ||
) |
Modify a guild role.
Guild Role Update
eventclient | the client created with discord_init() |
guild_id | the unique id of the guild that the role belongs to |
role_id | the unique id of the role to modify |
params | request parameters |
ret | return context of the request. if successful a discord_role will be sent over to its assigned done callback |
CCORDcode discord_delete_guild_role | ( | struct discord * | client, |
u64snowflake | guild_id, | ||
u64snowflake | role_id, | ||
struct discord_delete_guild_role * | params, | ||
struct discord_ret * | ret | ||
) |
Delete a guild role.
Guild Role Delete
eventclient | the client created with discord_init() |
guild_id | the unique id of the guild that the role belongs to |
role_id | the unique id of the role to delete |
params | request parameters |
ret | return context of the request. if successful the assigned done will be triggered |