Concord - C Discord API library
A Discord API wrapper library written in C
Guild

Guild's public API supported by Concord. More...

Collaboration diagram for Guild:

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...
 

Functions

CCORDcode discord_create_guild (struct discord *client, struct discord_create_guild *params, struct discord_ret_guild *ret)
 Create a new guild. More...
 
CCORDcode discord_get_guild (struct discord *client, u64snowflake guild_id, struct discord_ret_guild *ret)
 Get the guild with given id. More...
 
CCORDcode discord_get_guild_preview (struct discord *client, u64snowflake guild_id, struct discord_ret_guild_preview *ret)
 Get the preview for the given guild. More...
 
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. More...
 
CCORDcode discord_delete_guild (struct discord *client, u64snowflake guild_id, struct discord_ret *ret)
 Delete a guild permanently, user must be owner. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
CCORDcode discord_get_guild_bans (struct discord *client, u64snowflake guild_id, struct discord_ret_bans *ret)
 Fetch banned users for given guild. More...
 
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. More...
 
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. More...
 
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. More...
 
CCORDcode discord_get_guild_roles (struct discord *client, u64snowflake guild_id, struct discord_ret_roles *ret)
 Get guild roles. More...
 
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. More...
 
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. More...
 
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. More...
 
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) More...
 
CCORDcode discord_get_guild_invites (struct discord *client, u64snowflake guild_id, struct discord_ret_invites *ret)
 Get guild invites. More...
 
CCORDcode discord_get_guild_integrations (struct discord *client, u64snowflake guild_id, struct discord_ret_integrations *ret)
 Get guild integrations. More...
 
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. More...
 
CCORDcode discord_get_guild_widget_settings (struct discord *client, u64snowflake guild_id, struct discord_ret_guild_widget_settings *ret)
 Get a guild widget settings. More...
 
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. More...
 
CCORDcode discord_get_guild_widget (struct discord *client, u64snowflake guild_id, struct discord_ret_guild_widget *ret)
 Get the widget for the guild. More...
 
CCORDcode discord_get_guild_vanity_url (struct discord *client, u64snowflake guild_id, struct discord_ret_invite *ret)
 Get invite from a given guild. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

Detailed Description

Guild's public API supported by Concord.

Function Documentation

◆ discord_create_guild()

CCORDcode discord_create_guild ( struct discord client,
struct discord_create_guild params,
struct discord_ret_guild ret 
)

Create a new guild.

Note
Fires a Guild Create event
Parameters
clientthe client created with discord_init()
paramsrequest parameters
retreturn context of the request. if successful a discord_guild will be sent over to its assigned done callback
See also
discord_ret_guild for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_get_guild()

CCORDcode discord_get_guild ( struct discord client,
u64snowflake  guild_id,
struct discord_ret_guild ret 
)

Get the guild with given id.

Todo:
missing query parameters
Note
If with_counts is set to true, this endpoint will also return approximate_member_count and approximate_presence_count for the guild
Parameters
clientthe client created with discord_init()
guild_idthe unique id of the guild to retrieve
retreturn context of the request. if successful a discord_guild will be sent over to its assigned done callback
See also
discord_ret_guild for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_get_guild_preview()

CCORDcode discord_get_guild_preview ( struct discord client,
u64snowflake  guild_id,
struct discord_ret_guild_preview ret 
)

Get the preview for the given guild.

Note
If the user is not in the guild, then the guild must be lurkable
Parameters
clientthe client created with discord_init()
guild_idguild to get preview from
retreturn context of the request. if successful a discord_guild_preview will be sent over to its assigned done callback
See also
discord_ret_guild_preview for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_modify_guild()

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.

Note
Requires the MANAGE_GUILD permission
Fires a Guild Update event
Parameters
clientthe client created with discord_init()
guild_idthe unique id of the guild to modify
paramsrequest parameters
retreturn context of the request. if successful a discord_guild will be sent over to its assigned done callback
See also
discord_ret_guild for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_delete_guild()

CCORDcode discord_delete_guild ( struct discord client,
u64snowflake  guild_id,
struct discord_ret ret 
)

Delete a guild permanently, user must be owner.

Note
Fires a Guild Delete event
Parameters
clientthe client created with discord_init()
guild_idid of guild to delete
retreturn context of the request. if successful the assigned done will be triggered
See also
discord_ret for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_get_guild_channels()

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.

Parameters
clientthe client created with discord_init()
guild_idid of guild to fetch channels from
retreturn context of the request. if successful a discord_channels will be sent over to its assigned done callback
See also
discord_ret_channels for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary
Examples
fetch-messages.c, and guild.c.

◆ discord_create_guild_channel()

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.

Note
Requires the MANAGE_CHANNELS permission
If setting permission overwrites, only permissions your bot has in the guild can be allowed/denied. Setting MANAGE_ROLES permission in channels is only possible for guild administrators
Fires a Channel Create event
Parameters
clientthe client created with discord_init()
guild_idid of the guild to create a channel at
paramsrequest parameters
retreturn context of the request. if successful a discord_channel will be sent over to its assigned done callback
See also
discord_ret_channel for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary
Examples
channel.c.

◆ discord_modify_guild_channel_positions()

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.

Note
Requires MANAGE_CHANNELS permission
Parameters
clientthe client created with discord_init()
guild_idthe unique id of the guild to change the positions of the channels in
paramsrequest parameters
retreturn context of the request. if successful the assigned done will be triggered
See also
discord_ret for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_get_guild_member()

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.

Parameters
clientthe client created with discord_init()
guild_idguild the member belongs to
user_idunique user id of member
retreturn context of the request. if successful a discord_guild_member will be sent over to its assigned done callback
See also
discord_ret_guild_member for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary
Examples
guild.c.

◆ discord_list_guild_members()

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.

Parameters
clientthe client created with discord_init()
guild_idguild the members belongs to
requestparameters
retreturn context of the request. if successful a discord_guild_members will be sent over to its assigned done callback
See also
discord_ret_guild_members for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary
Examples
fetch-messages.c.

◆ discord_search_guild_members()

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.

Parameters
clientthe client created with discord_init()
guild_idguild the members belongs to
requestparameters
retreturn context of the request. if successful a discord_guild_members will be sent over to its assigned done callback
See also
discord_ret_guild_members for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_add_guild_member()

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.

Note
Requires valid oauth2 access token for the user with guilds.join scope
Fires a Guild Member Add event
The bot must be a member of the guild with CREATE_INSTANT_INVITE permission
Parameters
clientthe client created with discord_init()
guild_idguild to add the member to
user_idthe user to be added
requestparameters
retreturn context of the request. if successful a discord_guild_member will be sent over to its assigned done callback
See also
discord_ret_guild_member for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_modify_guild_member()

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.

Note
Fires a Guild Member Update event
See also
discord_disconnect_guild_member()
Parameters
clientthe client created with discord_init()
guild_idguild the member belongs to
user_idthe user id of member
requestparameters
retreturn context of the request. if successful a discord_guild_member will be sent over to its assigned done callback
See also
discord_ret_guild_member for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_modify_current_member()

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.

Note
Fires a Guild Member Update event
Parameters
clientthe client created with discord_init()
guild_idthe unique id of the guild where the member exists
paramsrequest parameters
retreturn context of the request. if successful a discord_guild_member will be sent over to its assigned done callback
See also
discord_ret_guild_member for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_modify_current_user_nick()

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.

Deprecated:
use discord_modify_current_member() instead
Note
Fires a Guild Member Update event
Parameters
clientthe client created with discord_init()
guild_idguild the member belongs to
paramsrequest parameters
retreturn context of the request. if successful a discord_guild_member will be sent over to its assigned done callback
See also
discord_ret_guild_member for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_add_guild_member_role()

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.

Note
Fires a Guild Member Update event
Parameters
clientthe client created with discord_init()
guild_idthe unique id of the guild where the member exists
user_idthe unique id of the user
role_idthe unique id of the role to be added
paramsrequest parameters
retreturn context of the request. if successful the assigned done will be triggered
See also
discord_ret for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary
Examples
guild.c.

◆ discord_remove_guild_member_role()

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.

Note
Requires the MANAGE_ROLES permission
Fires a Guild Member Update event
Parameters
clientthe client created with discord_init()
guild_idthe unique id of the guild where the member exists
user_idthe unique id of the user
role_idthe unique id of the role to be removed
paramsrequest parameters
retreturn context of the request. if successful the assigned done will be triggered
See also
discord_ret for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary
Examples
guild.c.

◆ discord_remove_guild_member()

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.

Note
Requires the KICK_MEMBERS permission
Fires a Guild Member Update event
Parameters
clientthe client created with discord_init()
guild_idthe guild to remove the member from
user_idthe user to be removed
paramsrequest parameters
retreturn context of the request. if successful the assigned done will be triggered
See also
discord_ret for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_get_guild_bans()

CCORDcode discord_get_guild_bans ( struct discord client,
u64snowflake  guild_id,
struct discord_ret_bans ret 
)

Fetch banned users for given guild.

Note
Requires the BAN_MEMBERS permission
Parameters
clientthe client created with discord_init()
guild_idthe guild to get the list from
retreturn context of the request. if successful a discord_bans will be sent over to its assigned done callback
See also
discord_ret_bans for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_get_guild_ban()

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.

Note
Requires the BAN_MEMBERS permission
Parameters
clientthe client created with discord_init()
guild_idthe guild to return the ban from
user_idthe user that is banned
retreturn context of the request. if successful a discord_ban will be sent over to its assigned done callback
See also
discord_ret_ban for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_create_guild_ban()

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.

Note
Requires the BAN_MEMBERS permission
Fires a Guild Ban Add event
Parameters
clientthe client created with discord_init()
guild_idguild the user belongs to
user_idthe user to be banned
paramsrequest parameters
retreturn context of the request. if successful the assigned done will be triggered
See also
discord_ret for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary
Examples
ban.c.

◆ discord_remove_guild_ban()

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.

Note
Requires the BAN_MEMBERS permission
Fires a Guild Ban Remove event
Parameters
clientthe client created with discord_init()
guild_idguild the user belonged to
user_idthe user to have its ban revoked
paramsrequest parameters
retreturn context of the request. if successful the assigned done will be triggered
See also
discord_ret for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary
Examples
ban.c.

◆ discord_get_guild_roles()

CCORDcode discord_get_guild_roles ( struct discord client,
u64snowflake  guild_id,
struct discord_ret_roles ret 
)

Get guild roles.

Parameters
clientthe client created with discord_init()
guild_idguild to get roles from
retreturn context of the request. if successful a discord_roles will be sent over to its assigned done callback
See also
discord_ret_roles for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary
Examples
guild.c.

◆ discord_create_guild_role()

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.

Note
Requires MANAGE_ROLES permission
Fires a Guild Role Create event
Parameters
clientthe client created with discord_init()
guild_idguild to add a role to
paramsrequest parameters
retreturn context of the request. if successful a discord_role will be sent over to its assigned done callback
See also
discord_ret_role for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary
Examples
guild.c.

◆ discord_get_guild_prune_count()

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.

Note
Requires the KICK_MEMBERS permission
By default will not remove users with roles. You can include specific roles in your prune by providing the params.include_roles value
Parameters
clientthe client created with discord_init()
guild_idthe unique id of the guild to be checked
paramsrequest parameters
retreturn context of the request. if successful a discord_prune_count will be sent over to its assigned done callback
See also
discord_ret_prune_count for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary
Examples
ban.c.

◆ discord_begin_guild_prune()

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.

Note
Discord recommends for larger servers to set "compute_prune_count" to false
Requires the KICK_MEMBERS permission
Fires multiple Guild Member Remove events
Parameters
clientthe client created with discord_init()
guild_idthe unique id of the guild to start the prune
paramsrequest parameters
retreturn context of the request. if successful the assigned done will be triggered
See also
discord_ret for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_get_guild_voice_regions()

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)

Parameters
clientthe client created with discord_init()
guild_idthe unique id of the guild to get voice regions from
retreturn context of the request. if successful a discord_voice_regions will be sent over to its assigned done callback
See also
discord_ret_voice_regions for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_get_guild_invites()

CCORDcode discord_get_guild_invites ( struct discord client,
u64snowflake  guild_id,
struct discord_ret_invites ret 
)

Get guild invites.

Note
requires the MANAGE_GUILD permission
Parameters
clientthe client created with discord_init()
guild_idthe unique id of the guild to get invites from
retreturn context of the request. if successful a discord_invites will be sent over to its assigned done callback
See also
discord_ret_invites for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_get_guild_integrations()

CCORDcode discord_get_guild_integrations ( struct discord client,
u64snowflake  guild_id,
struct discord_ret_integrations ret 
)

Get guild integrations.

Note
requires the MANAGE_GUILD permission
Parameters
clientthe client created with discord_init()
guild_idthe unique id of the guild to get integrations from
retreturn context of the request. if successful a discord_integrations will be sent over to its assigned done callback
See also
discord_ret_integrations for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_delete_guild_integrations()

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.

Note
Requires the MANAGE_GUILD permission
Fires a Guild Integrations Update event
Parameters
clientthe client created with discord_init()
guild_idthe unique id of the guild to delete the integrations from
integration_idthe id of the integration to delete
paramsrequest parameters
retreturn context of the request. if successful the assigned done will be triggered
See also
discord_ret for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_get_guild_widget_settings()

CCORDcode discord_get_guild_widget_settings ( struct discord client,
u64snowflake  guild_id,
struct discord_ret_guild_widget_settings ret 
)

Get a guild widget settings.

Note
requires the MANAGE_GUILD permission
Parameters
clientthe client created with discord_init()
guild_idthe unique id of the guild to get widget settings from
retreturn context of the request. if successful a discord_guild_widget_settings will be sent over to its assigned done callback
See also
discord_ret_guild_widget_settings for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_modify_guild_widget()

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.

Note
requires the MANAGE_GUILD permission
Parameters
clientthe client created with discord_init()
guild_idthe unique id of the guild to modify the widget settings from
paramrequest parameters
retreturn context of the request. if successful a discord_guild_widget_settings will be sent over to its assigned done callback
See also
discord_ret_guild_widget_settings for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_get_guild_widget()

CCORDcode discord_get_guild_widget ( struct discord client,
u64snowflake  guild_id,
struct discord_ret_guild_widget ret 
)

Get the widget for the guild.

Parameters
clientthe client created with discord_init()
guild_idthe unique id of the guild to get the widget from
retreturn context of the request. if successful a discord_guild_widget will be sent over to its assigned done callback
See also
discord_ret_guild_widget for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_get_guild_vanity_url()

CCORDcode discord_get_guild_vanity_url ( struct discord client,
u64snowflake  guild_id,
struct discord_ret_invite ret 
)

Get invite from a given guild.

Parameters
clientthe client created with discord_init()
guild_idthe unique id of the guild to get vanity url from
retreturn context of the request. if successful a discord_invite will be sent over to its assigned done callback
See also
discord_ret_invite for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_get_guild_welcome_screen()

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.

Parameters
clientthe client created with discord_init()
guild_idthe unique id of the guild to get welcome screen of
retreturn context of the request. if successful a discord_welcome_screen will be sent over to its assigned done callback
See also
discord_ret_welcome_screen for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_modify_guild_welcome_screen()

Modify the Welcome Screen for the guild.

Note
requires the MANAGE_GUILD permission
Parameters
clientthe client created with discord_init()
guild_idthe unique id of the guild to modify welcome screen of
paramsrequest parameters
retreturn context of the request. if successful a discord_welcome_screen will be sent over to its assigned done callback
See also
discord_ret_welcome_screen for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_modify_current_user_voice_state()

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.

See also
Caveats https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state-caveats
Parameters
clientthe client created with discord_init()
guild_idthe unique id of the guild to modify the current user's voice state
paramsrequest parameters
retreturn context of the request. if successful the assigned done will be triggered
See also
discord_ret for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_modify_user_voice_state()

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.

See also
Caveats https://discord.com/developers/docs/resources/guild#modify-user-voice-state-caveats
Parameters
clientthe client created with discord_init()
guild_idthe unique id of the guild to modify the user's voice state
user_idthe unique id of user to have its voice state modified
paramsrequest parameters
retreturn context of the request. if successful the assigned done will be triggered
See also
discord_ret for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_modify_guild_role_positions()

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.

Note
Requires the MANAGE_ROLES permission
Fires multiple Guild Role Update events
Parameters
clientthe client created with discord_init()
guild_idthe unique id of the guild to get welcome screen of
paramsrequest parameters
retreturn context of the request. if successful a discord_roles will be sent over to its assigned done callback
See also
discord_ret_roles for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_modify_guild_role()

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.

Note
Requires the MANAGE_ROLES permission
Fires a Guild Role Update event
Parameters
clientthe client created with discord_init()
guild_idthe unique id of the guild that the role belongs to
role_idthe unique id of the role to modify
paramsrequest parameters
retreturn context of the request. if successful a discord_role will be sent over to its assigned done callback
See also
discord_ret_role for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_delete_guild_role()

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.

Note
Requires the MANAGE_ROLES permission
Fires a Guild Role Delete event
Parameters
clientthe client created with discord_init()
guild_idthe unique id of the guild that the role belongs to
role_idthe unique id of the role to delete
paramsrequest parameters
retreturn context of the request. if successful the assigned done will be triggered
See also
discord_ret for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary
Examples
guild.c.