dscrd
Discord C library
Data Fields
DiscordClient_s Struct Reference

Discord session. More...

#include <dscrd.h>

Collaboration diagram for DiscordClient_s:
Collaboration graph
[legend]

Data Fields

char _name [21]
 reserved More...
 
uint8_t _type
 
void * c
 Pointer used internally by rest library, it's casted default to void except in library. More...
 
unsigned char api
 
token_type type
 Session type, one of token_type_e. More...
 
char * token
 pure token More...
 
char * auth_string
 Authentication header used by rest library. More...
 
struct DiscordUser_s me
 DiscordUser_s structure of current user; equal to DiscordClient::user except it's a data structure. More...
 
struct DiscordUser_suser
 DiscordUser_s pointer of current user; equal to DiscordClient::me except it's a pointer. More...
 
unsigned char user_status
 current user status, one of dscrd_user_status More...
 
bool temporary
 tells if created DiscordClient is temporary and has to be freed when connected object is freed. More...
 
short refc [DSCRD_TYPE_LAST]
 
void * gateway
 pointer to DiscordGateway session (if any) More...
 
int gateway_flags
 flags More...
 

Detailed Description

Discord session.

You should not access any values except DiscordClient::me / DiscordClient::user and DiscordClient::api

See also
DiscordClient_s for detailed element documentation.
DiscordClient_open for getting such session.

Field Documentation

◆ _name

char _name[21]

reserved

◆ _type

uint8_t _type

◆ api

unsigned char api

Discord API version used in session. You can overwrite this by calling dscrd_overwrite_api before creating session.

◆ auth_string

char* auth_string

Authentication header used by rest library.

◆ c

void* c

Pointer used internally by rest library, it's casted default to void except in library.

◆ gateway

void* gateway

pointer to DiscordGateway session (if any)

◆ gateway_flags

flags

◆ me

struct DiscordUser_s me

DiscordUser_s structure of current user; equal to DiscordClient::user except it's a data structure.

◆ refc

short refc[DSCRD_TYPE_LAST]

◆ temporary

bool temporary

tells if created DiscordClient is temporary and has to be freed when connected object is freed.

◆ token

char* token

pure token

◆ type

token_type type

Session type, one of token_type_e.

◆ user

struct DiscordUser_s* user

DiscordUser_s pointer of current user; equal to DiscordClient::me except it's a pointer.

◆ user_status

unsigned char user_status

current user status, one of dscrd_user_status


The documentation for this struct was generated from the following file: