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

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

Collaboration diagram for Channel:

Modules

 Embed builder
 Dynamic embed builder functions.
 
 Helper functions
 Custom helper functions.
 
 Message flags
 

Data Structures

struct  discord_ret_channel
 Request's return context. More...
 
struct  discord_ret_channels
 Request's return context. More...
 
struct  discord_ret_message
 Request's return context. More...
 
struct  discord_ret_messages
 Request's return context. More...
 
struct  discord_ret_followed_channel
 Request's return context. More...
 
struct  discord_ret_thread_members
 Request's return context. More...
 
struct  discord_ret_thread_response_body
 Request's return context. More...
 

Functions

CCORDcode discord_get_channel (struct discord *client, u64snowflake channel_id, struct discord_ret_channel *ret)
 Get channel from given id. More...
 
CCORDcode discord_modify_channel (struct discord *client, u64snowflake channel_id, struct discord_modify_channel *params, struct discord_ret_channel *ret)
 Update a channel's settings. More...
 
CCORDcode discord_delete_channel (struct discord *client, u64snowflake channel_id, struct discord_delete_channel *params, struct discord_ret_channel *ret)
 Delete a channel, or close a private message. More...
 
CCORDcode discord_get_channel_messages (struct discord *client, u64snowflake channel_id, struct discord_get_channel_messages *params, struct discord_ret_messages *ret)
 Get messages for a given channel. More...
 
CCORDcode discord_get_channel_message (struct discord *client, u64snowflake channel_id, u64snowflake message_id, struct discord_ret_message *ret)
 Get a specific message in the channel. More...
 
CCORDcode discord_create_message (struct discord *client, u64snowflake channel_id, struct discord_create_message *params, struct discord_ret_message *ret)
 Post a message to a guild text or DM channel. More...
 
CCORDcode discord_crosspost_message (struct discord *client, u64snowflake channel_id, u64snowflake message_id, struct discord_ret_message *ret)
 Crosspost a message in a News Channel to following channels. More...
 
CCORDcode discord_create_reaction (struct discord *client, u64snowflake channel_id, u64snowflake message_id, u64snowflake emoji_id, const char emoji_name[], struct discord_ret *ret)
 Create a reaction for the message. More...
 
CCORDcode discord_delete_own_reaction (struct discord *client, u64snowflake channel_id, u64snowflake message_id, u64snowflake emoji_id, const char emoji_name[], struct discord_ret *ret)
 Delete a reaction the current user has made for the message. More...
 
CCORDcode discord_delete_user_reaction (struct discord *client, u64snowflake channel_id, u64snowflake message_id, u64snowflake user_id, u64snowflake emoji_id, const char emoji_name[], struct discord_ret *ret)
 Deletes another user's reaction. More...
 
CCORDcode discord_get_reactions (struct discord *client, u64snowflake channel_id, u64snowflake message_id, u64snowflake emoji_id, const char emoji_name[], struct discord_get_reactions *params, struct discord_ret_users *ret)
 Get a list of users that reacted with given emoji. More...
 
CCORDcode discord_delete_all_reactions (struct discord *client, u64snowflake channel_id, u64snowflake message_id, struct discord_ret *ret)
 Deletes all reactions from message. More...
 
CCORDcode discord_delete_all_reactions_for_emoji (struct discord *client, u64snowflake channel_id, u64snowflake message_id, u64snowflake emoji_id, const char emoji_name[], struct discord_ret *ret)
 Deletes all the reactions for a given emoji on message. More...
 
CCORDcode discord_edit_message (struct discord *client, u64snowflake channel_id, u64snowflake message_id, struct discord_edit_message *params, struct discord_ret_message *ret)
 Edit a previously sent message. More...
 
CCORDcode discord_delete_message (struct discord *client, u64snowflake channel_id, u64snowflake message_id, struct discord_delete_message *params, struct discord_ret *ret)
 Delete a message. More...
 
CCORDcode discord_bulk_delete_messages (struct discord *client, u64snowflake channel_id, struct discord_bulk_delete_messages *params, struct discord_ret *ret)
 Delete multiple messages in a single request. More...
 
CCORDcode discord_edit_channel_permissions (struct discord *client, u64snowflake channel_id, u64snowflake overwrite_id, struct discord_edit_channel_permissions *params, struct discord_ret *ret)
 Edit the channel permission overwrites for a user or role in a channel. More...
 
CCORDcode discord_get_channel_invites (struct discord *client, u64snowflake channel_id, struct discord_ret_invites *ret)
 Get invites (with invite metadata) for the channel. More...
 
CCORDcode discord_create_channel_invite (struct discord *client, u64snowflake channel_id, struct discord_create_channel_invite *params, struct discord_ret_invite *ret)
 Create a new invite for the channel. More...
 
CCORDcode discord_delete_channel_permission (struct discord *client, u64snowflake channel_id, u64snowflake overwrite_id, struct discord_delete_channel_permission *params, struct discord_ret *ret)
 Delete a channel permission overwrite for a user or role in a channel. More...
 
CCORDcode discord_trigger_typing_indicator (struct discord *client, u64snowflake channel_id, struct discord_ret *ret)
 Post a typing indicator for the specified channel. More...
 
CCORDcode discord_follow_news_channel (struct discord *client, u64snowflake channel_id, struct discord_follow_news_channel *params, struct discord_ret_followed_channel *ret)
 Follow a News Channel to send messages to a target channel. More...
 
CCORDcode discord_get_pinned_messages (struct discord *client, u64snowflake channel_id, struct discord_ret_messages *ret)
 Get all pinned messages in the channel. More...
 
CCORDcode discord_pin_message (struct discord *client, u64snowflake channel_id, u64snowflake message_id, struct discord_pin_message *params, struct discord_ret *ret)
 Pin a message to a channel. More...
 
CCORDcode discord_unpin_message (struct discord *client, u64snowflake channel_id, u64snowflake message_id, struct discord_unpin_message *params, struct discord_ret *ret)
 Unpin a message from a channel. More...
 
CCORDcode discord_group_dm_add_recipient (struct discord *client, u64snowflake channel_id, u64snowflake user_id, struct discord_group_dm_add_recipient *params, struct discord_ret *ret)
 Adds a recipient to a Group DM using their access token. More...
 
CCORDcode discord_group_dm_remove_recipient (struct discord *client, u64snowflake channel_id, u64snowflake user_id, struct discord_ret *ret)
 Removes a recipient from a Group DM. More...
 
CCORDcode discord_start_thread_with_message (struct discord *client, u64snowflake channel_id, u64snowflake message_id, struct discord_start_thread_with_message *params, struct discord_ret_channel *ret)
 Creates a new thread from an existing message. More...
 
CCORDcode discord_start_thread_without_message (struct discord *client, u64snowflake channel_id, struct discord_start_thread_without_message *params, struct discord_ret_channel *ret)
 Creates a new thread that is not connected to an existing message. More...
 
CCORDcode discord_join_thread (struct discord *client, u64snowflake channel_id, struct discord_ret *ret)
 Adds the current user to an un-archived thread. More...
 
CCORDcode discord_add_thread_member (struct discord *client, u64snowflake channel_id, u64snowflake user_id, struct discord_ret *ret)
 Adds another member to an un-archived thread. More...
 
CCORDcode discord_leave_thread (struct discord *client, u64snowflake channel_id, struct discord_ret *ret)
 Removes the current user from a un-archived thread. More...
 
CCORDcode discord_remove_thread_member (struct discord *client, u64snowflake channel_id, u64snowflake user_id, struct discord_ret *ret)
 Removes another member from a un-archived thread. More...
 
CCORDcode discord_list_thread_members (struct discord *client, u64snowflake channel_id, struct discord_ret_thread_members *ret)
 Get members from a given thread channel. More...
 
CCORDcode discord_list_active_threads (struct discord *client, u64snowflake channel_id, struct discord_ret_thread_response_body *ret)
 Get all active threads in a given channel. More...
 
CCORDcode discord_list_public_archived_threads (struct discord *client, u64snowflake channel_id, u64unix_ms before, int limit, struct discord_ret_thread_response_body *ret)
 Get public archived threads in a given channel. More...
 
CCORDcode discord_list_private_archived_threads (struct discord *client, u64snowflake channel_id, u64unix_ms before, int limit, struct discord_ret_thread_response_body *ret)
 Get private archived threads in a given channel. More...
 
CCORDcode discord_list_joined_private_archived_threads (struct discord *client, u64snowflake channel_id, u64unix_ms before, int limit, struct discord_ret_thread_response_body *ret)
 Get private archived threads that current user has joined. More...
 

Detailed Description

Channel's public API supported by Concord.

Function Documentation

◆ discord_get_channel()

CCORDcode discord_get_channel ( struct discord client,
u64snowflake  channel_id,
struct discord_ret_channel ret 
)

Get channel from given id.

Note
If the channel is a thread, a thread member object is included in the returned result
Parameters
clientthe client created with discord_init()
channel_idthe channel to be retrieved
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

◆ discord_modify_channel()

CCORDcode discord_modify_channel ( struct discord client,
u64snowflake  channel_id,
struct discord_modify_channel params,
struct discord_ret_channel ret 
)

Update a channel's settings.

Parameters
clientthe client created with discord_init()
channel_idthe channel to be modified
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_delete_channel()

CCORDcode discord_delete_channel ( struct discord client,
u64snowflake  channel_id,
struct discord_delete_channel params,
struct discord_ret_channel ret 
)

Delete a channel, or close a private message.

Note
Requires the MANAGE_CHANNELS permission for the guild, or MANAGE_THREADS if the channel is a thread
Deleting a category does not delete its child channels; they will have their parent_id removed and a Channel Update Gateway event will fire for each of them
Fires a Channel Delete event (or Thread Delete if the channel was a thread)
Parameters
clientthe client created with discord_init()
channel_idthe channel to be deleted
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_get_channel_messages()

CCORDcode discord_get_channel_messages ( struct discord client,
u64snowflake  channel_id,
struct discord_get_channel_messages params,
struct discord_ret_messages ret 
)

Get messages for a given channel.

Note
If operating on a guild channel, this endpoint requires the VIEW_CHANNEL permission to be present on the current user
If the current user is missing the READ_MESSAGE_HISTORY permission in the channel then this will return no messages (since they cannot read the message history)
The before, after, and around keys are mutually exclusive, only one may be passed at a time
Parameters
clientthe client created with discord_init()
channel_idthe channel to get messages from
paramsrequest parameters
retreturn context of the request. if successful a discord_messages will be sent over to its assigned done callback
See also
discord_ret_messages for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary
Examples
fetch-messages.c.

◆ discord_get_channel_message()

CCORDcode discord_get_channel_message ( struct discord client,
u64snowflake  channel_id,
u64snowflake  message_id,
struct discord_ret_message ret 
)

Get a specific message in the channel.

Note
If operating on a guild channel, this endpoint requires the 'READ_MESSAGE_HISTORY' permission to be present on the current user
Parameters
clientthe client created with discord_init()
channel_idthe channel where the message resides
message_idthe message itself
retreturn context of the request. if successful a discord_message will be sent over to its assigned done callback
See also
discord_ret_message for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_create_message()

CCORDcode discord_create_message ( struct discord client,
u64snowflake  channel_id,
struct discord_create_message params,
struct discord_ret_message ret 
)

Post a message to a guild text or DM channel.

Note
Fires a Message Create event
Parameters
clientthe client created with discord_init()
channel_idthe channel to send the message at
paramsrequest parameters
retreturn context of the request. if successful a discord_message will be sent over to its assigned done callback
See also
discord_ret_message for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary
Examples
audit-log.c, ban.c, cache.c, channel.c, components.c, embed.c, emoji.c, guild-template.c, guild.c, invite.c, manual-dm.c, pin.c, and reaction.c.

◆ discord_crosspost_message()

CCORDcode discord_crosspost_message ( struct discord client,
u64snowflake  channel_id,
u64snowflake  message_id,
struct discord_ret_message ret 
)

Crosspost a message in a News Channel to following channels.

Note
This endpoint requires the 'SEND_MESSAGES' permission, if the current user sent the message, or additionally the 'MANAGE_MESSAGES' permission, for all other messages, to be present for the current user
Parameters
clientthe client created with discord_init()
channel_idthe news channel that will crosspost
message_idthe message that will crospost
retreturn context of the request. if successful a discord_message will be sent over to its assigned done callback
See also
discord_ret_message for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_create_reaction()

CCORDcode discord_create_reaction ( struct discord client,
u64snowflake  channel_id,
u64snowflake  message_id,
u64snowflake  emoji_id,
const char  emoji_name[],
struct discord_ret ret 
)

Create a reaction for the message.

Parameters
clientthe client created with discord_init()
channel_idthe channel that the message belongs to
message_idthe message to receive a reaction
emoji_idthe emoji id (leave as 0 if not a custom emoji)
emoji_namethe emoji name
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
reaction.c.

◆ discord_delete_own_reaction()

CCORDcode discord_delete_own_reaction ( struct discord client,
u64snowflake  channel_id,
u64snowflake  message_id,
u64snowflake  emoji_id,
const char  emoji_name[],
struct discord_ret ret 
)

Delete a reaction the current user has made for the message.

Parameters
clientthe client created with discord_init()
channel_idthe channel that the message belongs to
message_idthe message to have a reaction deleted
emoji_idthe emoji id (leave as 0 if not a custom emoji)
emoji_namethe emoji name
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
reaction.c.

◆ discord_delete_user_reaction()

CCORDcode discord_delete_user_reaction ( struct discord client,
u64snowflake  channel_id,
u64snowflake  message_id,
u64snowflake  user_id,
u64snowflake  emoji_id,
const char  emoji_name[],
struct discord_ret ret 
)

Deletes another user's reaction.

Parameters
clientthe client created with discord_init()
channel_idthe channel that the message belongs to
message_idthe message to have a reaction deleted
user_idthe user the reaction belongs to
emoji_idthe emoji id (leave as 0 if not a custom emoji)
emoji_namethe emoji name
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
reaction.c.

◆ discord_get_reactions()

CCORDcode discord_get_reactions ( struct discord client,
u64snowflake  channel_id,
u64snowflake  message_id,
u64snowflake  emoji_id,
const char  emoji_name[],
struct discord_get_reactions params,
struct discord_ret_users ret 
)

Get a list of users that reacted with given emoji.

Parameters
clientthe client created with discord_init()
channel_idthe channel that the message belongs to
message_idthe message reacted to
emoji_idthe emoji id (leave as 0 if not a custom emoji)
emoji_namethe emoji name
paramsrequest parameters
retreturn context of the request. if successful a discord_users will be sent over to its assigned done callback
See also
discord_ret_users for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary
Examples
reaction.c.

◆ discord_delete_all_reactions()

CCORDcode discord_delete_all_reactions ( struct discord client,
u64snowflake  channel_id,
u64snowflake  message_id,
struct discord_ret ret 
)

Deletes all reactions from message.

Parameters
clientthe client created with discord_init()
channel_idthe channel that the message belongs to
message_idthe message that will be purged of reactions
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
reaction.c.

◆ discord_delete_all_reactions_for_emoji()

CCORDcode discord_delete_all_reactions_for_emoji ( struct discord client,
u64snowflake  channel_id,
u64snowflake  message_id,
u64snowflake  emoji_id,
const char  emoji_name[],
struct discord_ret ret 
)

Deletes all the reactions for a given emoji on message.

Parameters
clientthe client created with discord_init()
channel_idthe channel that the message belongs to
message_idthe message that will be purged of reactions from particular emoji
emoji_idthe emoji id (leave as 0 if not a custom emoji)
emoji_namethe emoji name
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
reaction.c.

◆ discord_edit_message()

CCORDcode discord_edit_message ( struct discord client,
u64snowflake  channel_id,
u64snowflake  message_id,
struct discord_edit_message params,
struct discord_ret_message ret 
)

Edit a previously sent message.

Parameters
clientthe client created with discord_init()
channel_idthe channel that the message belongs to
message_idthe message that will be purged of reactions from particular emoji
paramsrequest parameters
retreturn context of the request. if successful a discord_message will be sent over to its assigned done callback
See also
discord_ret_message for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_delete_message()

CCORDcode discord_delete_message ( struct discord client,
u64snowflake  channel_id,
u64snowflake  message_id,
struct discord_delete_message params,
struct discord_ret ret 
)

Delete a message.

Parameters
clientthe client created with discord_init()
channel_idthe channel that the message belongs to
message_idthe message that will be purged of reactions from particular emoji
paramsrequest parameters
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_bulk_delete_messages()

CCORDcode discord_bulk_delete_messages ( struct discord client,
u64snowflake  channel_id,
struct discord_bulk_delete_messages params,
struct discord_ret ret 
)

Delete multiple messages in a single request.

Parameters
clientthe client created with discord_init()
channel_idthe channel that the message belongs to
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_edit_channel_permissions()

CCORDcode discord_edit_channel_permissions ( struct discord client,
u64snowflake  channel_id,
u64snowflake  overwrite_id,
struct discord_edit_channel_permissions params,
struct discord_ret ret 
)

Edit the channel permission overwrites for a user or role in a channel.

Parameters
clientthe client created with discord_init()
channel_idthe channel that the message belongs to
overwrite_id
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_channel_invites()

CCORDcode discord_get_channel_invites ( struct discord client,
u64snowflake  channel_id,
struct discord_ret_invites ret 
)

Get invites (with invite metadata) for the channel.

Parameters
clientthe client created with discord_init()
channel_idthe channel that the message belongs to
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
Examples
channel.c.

◆ discord_create_channel_invite()

CCORDcode discord_create_channel_invite ( struct discord client,
u64snowflake  channel_id,
struct discord_create_channel_invite params,
struct discord_ret_invite ret 
)

Create a new invite for the channel.

Parameters
clientthe client created with discord_init()
channel_idthe channel that the message belongs to
paramsrequest parameters
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
Examples
channel.c.

◆ discord_delete_channel_permission()

CCORDcode discord_delete_channel_permission ( struct discord client,
u64snowflake  channel_id,
u64snowflake  overwrite_id,
struct discord_delete_channel_permission params,
struct discord_ret ret 
)

Delete a channel permission overwrite for a user or role in a channel.

Parameters
clientthe client created with discord_init()
channel_idthe channel to the permission deleted
overwrite_idthe id of the overwritten permission
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_trigger_typing_indicator()

CCORDcode discord_trigger_typing_indicator ( struct discord client,
u64snowflake  channel_id,
struct discord_ret ret 
)

Post a typing indicator for the specified channel.

Parameters
clientthe client created with discord_init()
channel_idthe channel to post the typing indicator to
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_follow_news_channel()

CCORDcode discord_follow_news_channel ( struct discord client,
u64snowflake  channel_id,
struct discord_follow_news_channel params,
struct discord_ret_followed_channel ret 
)

Follow a News Channel to send messages to a target channel.

Note
Requires MANAGE_WEBHOOKS permission in the target channel MANAGE_WEBHOOKS permission in the target channel
Parameters
clientthe client created with discord_init()
channel_idthe channel to be followed
retreturn context of the request. if successful a discord_followed_channel will be sent over to its assigned done callback
See also
discord_ret_followed_channel for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_get_pinned_messages()

CCORDcode discord_get_pinned_messages ( struct discord client,
u64snowflake  channel_id,
struct discord_ret_messages ret 
)

Get all pinned messages in the channel.

Parameters
clientthe client created with discord_init()
channel_idthe channel where the get pinned messages from
retreturn context of the request. if successful a discord_messages will be sent over to its assigned done callback
See also
discord_ret_messages for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary
Examples
pin.c.

◆ discord_pin_message()

CCORDcode discord_pin_message ( struct discord client,
u64snowflake  channel_id,
u64snowflake  message_id,
struct discord_pin_message params,
struct discord_ret ret 
)

Pin a message to a channel.

Parameters
clientthe client created with discord_init()
channel_idchannel to pin the message on
message_idmessage to be pinned
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
pin.c.

◆ discord_unpin_message()

CCORDcode discord_unpin_message ( struct discord client,
u64snowflake  channel_id,
u64snowflake  message_id,
struct discord_unpin_message params,
struct discord_ret ret 
)

Unpin a message from a channel.

Parameters
clientthe client created with discord_init()
channel_idchannel for the message to be unpinned
message_idmessage to be unpinned
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
pin.c.

◆ discord_group_dm_add_recipient()

CCORDcode discord_group_dm_add_recipient ( struct discord client,
u64snowflake  channel_id,
u64snowflake  user_id,
struct discord_group_dm_add_recipient params,
struct discord_ret ret 
)

Adds a recipient to a Group DM using their access token.

Parameters
clientthe client created with discord_init()
channel_idgroup to add the user in
user_iduser 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

◆ discord_group_dm_remove_recipient()

CCORDcode discord_group_dm_remove_recipient ( struct discord client,
u64snowflake  channel_id,
u64snowflake  user_id,
struct discord_ret ret 
)

Removes a recipient from a Group DM.

Parameters
clientthe client created with discord_init()
channel_idchannel for the user to be removed from
user_iduser to be removed
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_start_thread_with_message()

CCORDcode discord_start_thread_with_message ( struct discord client,
u64snowflake  channel_id,
u64snowflake  message_id,
struct discord_start_thread_with_message params,
struct discord_ret_channel ret 
)

Creates a new thread from an existing message.

Note
Fires a Thread Create event
Parameters
clientthe client created with discord_init()
channel_idchannel to start a thread on
message_idmessage to start a thread from
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_start_thread_without_message()

CCORDcode discord_start_thread_without_message ( struct discord client,
u64snowflake  channel_id,
struct discord_start_thread_without_message params,
struct discord_ret_channel ret 
)

Creates a new thread that is not connected to an existing message.

Note
Fires a Thread Create event
Parameters
clientthe client created with discord_init()
channel_idchannel to start a thread on
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_join_thread()

CCORDcode discord_join_thread ( struct discord client,
u64snowflake  channel_id,
struct discord_ret ret 
)

Adds the current user to an un-archived thread.

Note
Fires a Thread Members Update event
Parameters
clientthe client created with discord_init()
channel_idthe thread to be joined
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_add_thread_member()

CCORDcode discord_add_thread_member ( struct discord client,
u64snowflake  channel_id,
u64snowflake  user_id,
struct discord_ret ret 
)

Adds another member to an un-archived thread.

Note
Fires a Thread Members Update event
Parameters
clientthe client created with discord_init()
channel_idthe thread to be joined
user_iduser to be added to thread
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_leave_thread()

CCORDcode discord_leave_thread ( struct discord client,
u64snowflake  channel_id,
struct discord_ret ret 
)

Removes the current user from a un-archived thread.

Note
Fires a Thread Members Update event
Parameters
clientthe client created with discord_init()
channel_idthe thread to be removed from
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_remove_thread_member()

CCORDcode discord_remove_thread_member ( struct discord client,
u64snowflake  channel_id,
u64snowflake  user_id,
struct discord_ret ret 
)

Removes another member from a un-archived thread.

Note
Fires a Thread Members Update event
Requires MANAGE_THREADS permission
Parameters
clientthe client created with discord_init()
channel_idthe thread to be removed from
user_iduser to be removed
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_list_thread_members()

CCORDcode discord_list_thread_members ( struct discord client,
u64snowflake  channel_id,
struct discord_ret_thread_members ret 
)

Get members from a given thread channel.

Note
Fires a Thread Members Update event
Requires MANAGE_THREADS permission
Parameters
clientthe client created with discord_init()
channel_idthe thread to be joined
retreturn context of the request. if successful a discord_thread_members will be sent over to its assigned done callback
See also
discord_ret_thread_members for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_list_active_threads()

CCORDcode discord_list_active_threads ( struct discord client,
u64snowflake  channel_id,
struct discord_ret_thread_response_body ret 
)

Get all active threads in a given channel.

Todo:
replace with https://discord.com/developers/docs/resources/guild#list-active-threads
Deprecated:
Discord will deprecate this in V10
Parameters
clientthe client created with discord_init()
channel_idthe channel to be searched for threads
retreturn context of the request. if successful a discord_thread_response_body will be sent over to its assigned done callback
See also
discord_ret_thread_response_body for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_list_public_archived_threads()

CCORDcode discord_list_public_archived_threads ( struct discord client,
u64snowflake  channel_id,
u64unix_ms  before,
int  limit,
struct discord_ret_thread_response_body ret 
)

Get public archived threads in a given channel.

Parameters
clientthe client created with discord_init()
channel_idthe channel to be searched for threads
beforereturn threads before this timestamp
limitmaximum number of threads to return
retreturn context of the request. if successful a discord_thread_response_body will be sent over to its assigned done callback
See also
discord_ret_thread_response_body for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_list_private_archived_threads()

CCORDcode discord_list_private_archived_threads ( struct discord client,
u64snowflake  channel_id,
u64unix_ms  before,
int  limit,
struct discord_ret_thread_response_body ret 
)

Get private archived threads in a given channel.

Parameters
clientthe client created with discord_init()
channel_idthe channel to be searched for threads
beforereturn threads before this timestamp
limitmaximum number of threads to return
retreturn context of the request. if successful a discord_thread_response_body will be sent over to its assigned done callback
See also
discord_ret_thread_response_body for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_list_joined_private_archived_threads()

CCORDcode discord_list_joined_private_archived_threads ( struct discord client,
u64snowflake  channel_id,
u64unix_ms  before,
int  limit,
struct discord_ret_thread_response_body ret 
)

Get private archived threads that current user has joined.

Parameters
clientthe client created with discord_init()
channel_idthe channel to be searched for threads
beforereturn threads before this timestamp
limitmaximum number of threads to return
retreturn context of the request. if successful a discord_thread_response_body will be sent over to its assigned done callback
See also
discord_ret_thread_response_body for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary