Concord - C Discord API library
A Discord API wrapper library written in C
interactions.h File Reference

Generated code. More...

#include <stddef.h>
#include <stdbool.h>
#include <inttypes.h>
#include "carray.h"
#include "cog-utils.h"
#include "types.h"
#include "jsmn.h"
#include "jsmn-find.h"
#include "json-build.h"
Include dependency graph for interactions.h:

Go to the source code of this file.

Data Structures

struct  discord_interaction
 
struct  discord_interaction_data
 
struct  discord_resolved_data
 
struct  discord_message_interaction
 
struct  discord_interaction_response
 
struct  discord_interaction_callback_data
 
struct  discord_edit_original_interaction_response
 
struct  discord_create_followup_message
 
struct  discord_edit_followup_message
 

Macros

#define JSMN_STRICT
 
#define JSMN_HEADER
 
#define JSONB_HEADER
 

Enumerations

enum  discord_interaction_types {
  DISCORD_INTERACTION_PING = 1 , DISCORD_INTERACTION_APPLICATION_COMMAND = 2 , DISCORD_INTERACTION_MESSAGE_COMPONENT = 3 , DISCORD_INTERACTION_APPLICATION_COMMAND_AUTOCOMPLETE = 4 ,
  DISCORD_INTERACTION_MODAL_SUBMIT = 5
}
 
enum  discord_interaction_callback_types {
  DISCORD_INTERACTION_PONG = 1 , DISCORD_INTERACTION_CHANNEL_MESSAGE_WITH_SOURCE = 4 , DISCORD_INTERACTION_DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE = 5 , DISCORD_INTERACTION_DEFERRED_UPDATE_MESSAGE = 6 ,
  DISCORD_INTERACTION_UPDATE_MESSAGE = 7 , DISCORD_INTERACTION_APPLICATION_COMMAND_AUTOCOMPLETE_RESULT = 8 , DISCORD_INTERACTION_MODAL = 9
}
 

Functions

void discord_interaction_init (struct discord_interaction *self)
 
void discord_interaction_cleanup (struct discord_interaction *self)
 
void discord_interaction_response_init (struct discord_interaction_response *self)
 
void discord_interaction_response_cleanup (struct discord_interaction_response *self)
 
void discord_edit_original_interaction_response_init (struct discord_edit_original_interaction_response *self)
 
void discord_edit_original_interaction_response_cleanup (struct discord_edit_original_interaction_response *self)
 
void discord_create_followup_message_init (struct discord_create_followup_message *self)
 
void discord_create_followup_message_cleanup (struct discord_create_followup_message *self)
 
void discord_edit_followup_message_init (struct discord_edit_followup_message *self)
 
void discord_edit_followup_message_cleanup (struct discord_edit_followup_message *self)
 
long discord_interaction_from_jsmnf (jsmnf_pair *root, const char *js, struct discord_interaction *self)
 
size_t discord_interaction_from_json (const char buf[], size_t size, struct discord_interaction *self)
 
long discord_interaction_response_from_jsmnf (jsmnf_pair *root, const char *js, struct discord_interaction_response *self)
 
size_t discord_interaction_response_from_json (const char buf[], size_t size, struct discord_interaction_response *self)
 
long discord_edit_original_interaction_response_from_jsmnf (jsmnf_pair *root, const char *js, struct discord_edit_original_interaction_response *self)
 
size_t discord_edit_original_interaction_response_from_json (const char buf[], size_t size, struct discord_edit_original_interaction_response *self)
 
long discord_create_followup_message_from_jsmnf (jsmnf_pair *root, const char *js, struct discord_create_followup_message *self)
 
size_t discord_create_followup_message_from_json (const char buf[], size_t size, struct discord_create_followup_message *self)
 
long discord_edit_followup_message_from_jsmnf (jsmnf_pair *root, const char *js, struct discord_edit_followup_message *self)
 
size_t discord_edit_followup_message_from_json (const char buf[], size_t size, struct discord_edit_followup_message *self)
 
jsonbcode discord_interaction_to_jsonb (jsonb *b, char buf[], size_t size, const struct discord_interaction *self)
 
size_t discord_interaction_to_json (char buf[], size_t size, const struct discord_interaction *self)
 
jsonbcode discord_interaction_response_to_jsonb (jsonb *b, char buf[], size_t size, const struct discord_interaction_response *self)
 
size_t discord_interaction_response_to_json (char buf[], size_t size, const struct discord_interaction_response *self)
 
jsonbcode discord_edit_original_interaction_response_to_jsonb (jsonb *b, char buf[], size_t size, const struct discord_edit_original_interaction_response *self)
 
size_t discord_edit_original_interaction_response_to_json (char buf[], size_t size, const struct discord_edit_original_interaction_response *self)
 
jsonbcode discord_create_followup_message_to_jsonb (jsonb *b, char buf[], size_t size, const struct discord_create_followup_message *self)
 
size_t discord_create_followup_message_to_json (char buf[], size_t size, const struct discord_create_followup_message *self)
 
jsonbcode discord_edit_followup_message_to_jsonb (jsonb *b, char buf[], size_t size, const struct discord_edit_followup_message *self)
 
size_t discord_edit_followup_message_to_json (char buf[], size_t size, const struct discord_edit_followup_message *self)
 

Detailed Description

Generated code.

Author
Cogmasters

Macro Definition Documentation

◆ JSMN_STRICT

#define JSMN_STRICT

◆ JSMN_HEADER

#define JSMN_HEADER

◆ JSONB_HEADER

#define JSONB_HEADER

Enumeration Type Documentation

◆ discord_interaction_types

Enumerator
DISCORD_INTERACTION_PING 
DISCORD_INTERACTION_APPLICATION_COMMAND 
DISCORD_INTERACTION_MESSAGE_COMPONENT 
DISCORD_INTERACTION_APPLICATION_COMMAND_AUTOCOMPLETE 
DISCORD_INTERACTION_MODAL_SUBMIT 

◆ discord_interaction_callback_types

Enumerator
DISCORD_INTERACTION_PONG 

ACK a DISCORD_INTERACTION_PING

DISCORD_INTERACTION_CHANNEL_MESSAGE_WITH_SOURCE 

respond to an interaction with a message

DISCORD_INTERACTION_DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE 

ACK an interaction and edit a response later, the user sees a loading state

DISCORD_INTERACTION_DEFERRED_UPDATE_MESSAGE 

for components, ACK an interaction and edit the original message later the user does not see a loading state

DISCORD_INTERACTION_UPDATE_MESSAGE 

for components, edit the message the component was attached to

DISCORD_INTERACTION_APPLICATION_COMMAND_AUTOCOMPLETE_RESULT 

respond to an autocomplete interaction with suggested choices

DISCORD_INTERACTION_MODAL 

respond to an interaction with a popup modal

Function Documentation

◆ discord_interaction_init()

void discord_interaction_init ( struct discord_interaction self)

◆ discord_interaction_cleanup()

void discord_interaction_cleanup ( struct discord_interaction self)

◆ discord_interaction_response_init()

void discord_interaction_response_init ( struct discord_interaction_response self)

◆ discord_interaction_response_cleanup()

void discord_interaction_response_cleanup ( struct discord_interaction_response self)

◆ discord_edit_original_interaction_response_init()

void discord_edit_original_interaction_response_init ( struct discord_edit_original_interaction_response self)

◆ discord_edit_original_interaction_response_cleanup()

void discord_edit_original_interaction_response_cleanup ( struct discord_edit_original_interaction_response self)

◆ discord_create_followup_message_init()

void discord_create_followup_message_init ( struct discord_create_followup_message self)

◆ discord_create_followup_message_cleanup()

void discord_create_followup_message_cleanup ( struct discord_create_followup_message self)

◆ discord_edit_followup_message_init()

void discord_edit_followup_message_init ( struct discord_edit_followup_message self)

◆ discord_edit_followup_message_cleanup()

void discord_edit_followup_message_cleanup ( struct discord_edit_followup_message self)

◆ discord_interaction_from_jsmnf()

long discord_interaction_from_jsmnf ( jsmnf_pair *  root,
const char *  js,
struct discord_interaction self 
)

◆ discord_interaction_from_json()

size_t discord_interaction_from_json ( const char  buf[],
size_t  size,
struct discord_interaction self 
)

◆ discord_interaction_response_from_jsmnf()

long discord_interaction_response_from_jsmnf ( jsmnf_pair *  root,
const char *  js,
struct discord_interaction_response self 
)

◆ discord_interaction_response_from_json()

size_t discord_interaction_response_from_json ( const char  buf[],
size_t  size,
struct discord_interaction_response self 
)

◆ discord_edit_original_interaction_response_from_jsmnf()

long discord_edit_original_interaction_response_from_jsmnf ( jsmnf_pair *  root,
const char *  js,
struct discord_edit_original_interaction_response self 
)

◆ discord_edit_original_interaction_response_from_json()

size_t discord_edit_original_interaction_response_from_json ( const char  buf[],
size_t  size,
struct discord_edit_original_interaction_response self 
)

◆ discord_create_followup_message_from_jsmnf()

long discord_create_followup_message_from_jsmnf ( jsmnf_pair *  root,
const char *  js,
struct discord_create_followup_message self 
)

◆ discord_create_followup_message_from_json()

size_t discord_create_followup_message_from_json ( const char  buf[],
size_t  size,
struct discord_create_followup_message self 
)

◆ discord_edit_followup_message_from_jsmnf()

long discord_edit_followup_message_from_jsmnf ( jsmnf_pair *  root,
const char *  js,
struct discord_edit_followup_message self 
)

◆ discord_edit_followup_message_from_json()

size_t discord_edit_followup_message_from_json ( const char  buf[],
size_t  size,
struct discord_edit_followup_message self 
)

◆ discord_interaction_to_jsonb()

jsonbcode discord_interaction_to_jsonb ( jsonb b,
char  buf[],
size_t  size,
const struct discord_interaction self 
)

◆ discord_interaction_to_json()

size_t discord_interaction_to_json ( char  buf[],
size_t  size,
const struct discord_interaction self 
)

◆ discord_interaction_response_to_jsonb()

jsonbcode discord_interaction_response_to_jsonb ( jsonb b,
char  buf[],
size_t  size,
const struct discord_interaction_response self 
)

◆ discord_interaction_response_to_json()

size_t discord_interaction_response_to_json ( char  buf[],
size_t  size,
const struct discord_interaction_response self 
)

◆ discord_edit_original_interaction_response_to_jsonb()

jsonbcode discord_edit_original_interaction_response_to_jsonb ( jsonb b,
char  buf[],
size_t  size,
const struct discord_edit_original_interaction_response self 
)

◆ discord_edit_original_interaction_response_to_json()

size_t discord_edit_original_interaction_response_to_json ( char  buf[],
size_t  size,
const struct discord_edit_original_interaction_response self 
)

◆ discord_create_followup_message_to_jsonb()

jsonbcode discord_create_followup_message_to_jsonb ( jsonb b,
char  buf[],
size_t  size,
const struct discord_create_followup_message self 
)

◆ discord_create_followup_message_to_json()

size_t discord_create_followup_message_to_json ( char  buf[],
size_t  size,
const struct discord_create_followup_message self 
)

◆ discord_edit_followup_message_to_jsonb()

jsonbcode discord_edit_followup_message_to_jsonb ( jsonb b,
char  buf[],
size_t  size,
const struct discord_edit_followup_message self 
)

◆ discord_edit_followup_message_to_json()

size_t discord_edit_followup_message_to_json ( char  buf[],
size_t  size,
const struct discord_edit_followup_message self 
)