Concord - C Discord API library
A Discord API wrapper library written in C
Helper functions

Custom helper functions. More...

Collaboration diagram for Helper functions:

Functions

CCORDcode discord_get_channel_at_pos (struct discord *client, u64snowflake guild_id, enum discord_channel_types type, int position, struct discord_ret_channel *ret)
 Get a guild's channel from its given numerical position. More...
 
void discord_overwrite_append (struct discord_overwrites *permission_overwrites, u64snowflake id, int type, u64bitmask allow, u64bitmask deny)
 Append to an overwrite list. More...
 

Detailed Description

Custom helper functions.

Function Documentation

◆ discord_get_channel_at_pos()

CCORDcode discord_get_channel_at_pos ( struct discord client,
u64snowflake  guild_id,
enum discord_channel_types  type,
int  position,
struct discord_ret_channel ret 
)

Get a guild's channel from its given numerical position.

Parameters
clientthe client created with discord_init()
guild_idguild the channel belongs to
typethe channel type where to take position reference from
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_overwrite_append()

void discord_overwrite_append ( struct discord_overwrites permission_overwrites,
u64snowflake  id,
int  type,
u64bitmask  allow,
u64bitmask  deny 
)

Append to an overwrite list.

Note
the list should be freed with discord_overwrite_list_free() after its no longer being used
Parameters
permission_overwriteslist to be appended to
idrole or user id
typeeither 0 (role) or 1 (member)
allowpermission bit set
denypermission bit set