Concord - C Discord API library
A Discord API wrapper library written in C
Discord error codes

Error codes triggered from Discord. More...

Collaboration diagram for Discord error codes:

Macros

#define CCORD_DISCORD_OK   CCORD_OK
 
#define CCORD_PENDING   1
 
#define CCORD_DISCORD_JSON_CODE   100
 
#define CCORD_DISCORD_BAD_AUTH   101
 
#define CCORD_DISCORD_RATELIMIT   102
 
#define CCORD_DISCORD_CONNECTION   103
 

Functions

const char * discord_code_as_string (CCORDcode code)
 Return the value of CCORDcode as a string. More...
 
const char * discord_strerror (CCORDcode code, struct discord *client)
 Return the meaning of CCORDcode. More...
 

Detailed Description

Error codes triggered from Discord.

Macro Definition Documentation

◆ CCORD_DISCORD_OK

#define CCORD_DISCORD_OK   CCORD_OK

Alias for CCORD_OK

◆ CCORD_PENDING

#define CCORD_PENDING   1

action is pending (ex: request has been enqueued and will be performed later)

◆ CCORD_DISCORD_JSON_CODE

#define CCORD_DISCORD_JSON_CODE   100

received a JSON error message

◆ CCORD_DISCORD_BAD_AUTH

#define CCORD_DISCORD_BAD_AUTH   101

bad authentication token

◆ CCORD_DISCORD_RATELIMIT

#define CCORD_DISCORD_RATELIMIT   102

being ratelimited

◆ CCORD_DISCORD_CONNECTION

#define CCORD_DISCORD_CONNECTION   103

couldn't establish connection to Discord

Function Documentation

◆ discord_code_as_string()

const char * discord_code_as_string ( CCORDcode  code)

Return the value of CCORDcode as a string.

Parameters
codethe CCORDcode value
Returns
the enum value as a string

◆ discord_strerror()

const char * discord_strerror ( CCORDcode  code,
struct discord client 
)

Return the meaning of CCORDcode.

Parameters
codethe CCORDcode value
client
Note
unused parameter
Returns
a string containing the code meaning
Examples
audit-log.c, channel.c, emoji.c, guild-template.c, guild.c, reaction.c, and slash-commands2.c.