User's public API supported by Concord.
More...
|
CCORDcode | discord_get_current_user (struct discord *client, struct discord_ret_user *ret) |
| Get client's user. More...
|
|
CCORDcode | discord_get_user (struct discord *client, u64snowflake user_id, struct discord_ret_user *ret) |
| Get user for a given id. More...
|
|
CCORDcode | discord_modify_current_user (struct discord *client, struct discord_modify_current_user *params, struct discord_ret_user *ret) |
| Modify client's user account settings. More...
|
|
CCORDcode | discord_get_current_user_guilds (struct discord *client, struct discord_ret_guilds *ret) |
| Get guilds client is a member of. More...
|
|
CCORDcode | discord_leave_guild (struct discord *client, u64snowflake guild_id, struct discord_ret *ret) |
| Leave a guild. More...
|
|
CCORDcode | discord_create_dm (struct discord *client, struct discord_create_dm *params, struct discord_ret_channel *ret) |
| Create a new DM channel with a given user. More...
|
|
CCORDcode | discord_create_group_dm (struct discord *client, struct discord_create_group_dm *params, struct discord_ret_channel *ret) |
| Create a new group DM channel with multiple users. More...
|
|
CCORDcode | discord_get_user_connections (struct discord *client, struct discord_ret_connections *ret) |
| Get a list of connection objects. More...
|
|
User's public API supported by Concord.
◆ discord_get_current_user()
Get client's user.
- Parameters
-
client | the client created with discord_init() |
ret | return context of the request. if successful a discord_user will be sent over to its assigned done callback |
- See also
- discord_ret_user for more options
- Returns
- CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary
◆ discord_get_user()
Get user for a given id.
- Parameters
-
client | the client created with discord_init() |
user_id | user to be fetched |
ret | return context of the request. if successful a discord_user will be sent over to its assigned done callback |
- See also
- discord_ret_user for more options
- Returns
- CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary
◆ discord_modify_current_user()
Modify client's user account settings.
- Parameters
-
client | the client created with discord_init() |
params | request parameters |
ret | return context of the request. if successful a discord_user will be sent over to its assigned done callback |
- See also
- discord_ret_user for more options
- Returns
- CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary
◆ discord_get_current_user_guilds()
Get guilds client is a member of.
- Note
- Requires the
guilds
oauth2 scope
- Parameters
-
client | the client created with discord_init() |
ret | return context of the request. if successful a discord_guilds will be sent over to its assigned done callback |
- See also
- discord_ret_guilds for more options
- Returns
- CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary
- Examples
- fetch-messages.c.
◆ discord_leave_guild()
Leave a guild.
- Parameters
-
client | the client created with discord_init() |
guild_id | guild to exit from |
ret | return 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_create_dm()
Create a new DM channel with a given user.
- Warning
- DMs should generally be initiated by a user action. If you open a significant amount of DMs too quickly, your bot may be rate limited or blocked from opening new ones
- Parameters
-
client | the client created with discord_init() |
params | the request parameters |
ret | return 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
- manual-dm.c.
◆ discord_create_group_dm()
Create a new group DM channel with multiple users.
- Note
- DMs created with this function will not be shown in the Discord client
-
Limited to 10 active group DMs
- Parameters
-
client | the client created with discord_init() |
params | the request parameters |
ret | return 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_get_user_connections()
Get a list of connection objects.
- Note
- Requires the
connections
oauth2 scope
- Parameters
-
- See also
- discord_ret_connections for more options
- Returns
- CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary