Concord - C Discord API library
A Discord API wrapper library written in C
application_commands.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 application_commands.h:

Go to the source code of this file.

Data Structures

struct  discord_application_command
 
struct  discord_application_commands
 
struct  discord_application_command_option
 
struct  discord_application_command_options
 
struct  discord_application_command_option_choice
 
struct  discord_application_command_option_choices
 
struct  discord_application_command_interaction_data_option
 
struct  discord_application_command_interaction_data_options
 
struct  discord_guild_application_command_permission
 
struct  discord_guild_application_command_permissions
 
struct  discord_application_command_permission
 
struct  discord_application_command_permissions
 
struct  discord_create_global_application_command
 
struct  discord_edit_global_application_command
 
struct  discord_create_guild_application_command
 
struct  discord_edit_guild_application_command
 
struct  discord_bulk_overwrite_guild_application_commands
 

Macros

#define JSMN_STRICT
 
#define JSMN_HEADER
 
#define JSONB_HEADER
 

Enumerations

enum  discord_application_command_types { DISCORD_APPLICATION_CHAT_INPUT = 1 , DISCORD_APPLICATION_USER = 2 , DISCORD_APPLICATION_MESSAGE = 3 }
 
enum  discord_application_command_option_types {
  DISCORD_APPLICATION_OPTION_SUB_COMMAND = 1 , DISCORD_APPLICATION_OPTION_SUB_COMMAND_GROUP = 2 , DISCORD_APPLICATION_OPTION_STRING = 3 , DISCORD_APPLICATION_OPTION_INTEGER = 4 ,
  DISCORD_APPLICATION_OPTION_BOOLEAN = 5 , DISCORD_APPLICATION_OPTION_USER = 6 , DISCORD_APPLICATION_OPTION_CHANNEL = 7 , DISCORD_APPLICATION_OPTION_ROLE = 8 ,
  DISCORD_APPLICATION_OPTION_MENTIONABLE = 9 , DISCORD_APPLICATION_OPTION_NUMBER = 10 , DISCORD_APPLICATION_OPTION_ATTACHMENT = 11
}
 
enum  discord_application_command_permission_types { DISCORD_APPLICATION_PERMISSION_ROLE = 1 , DISCORD_APPLICATION_PERMISSION_USER = 2 , DISCORD_APPLICATION_PERMISSION_CHANNEL = 3 }
 

Functions

void discord_application_command_init (struct discord_application_command *self)
 
void discord_application_command_cleanup (struct discord_application_command *self)
 
void discord_application_commands_cleanup (struct discord_application_commands *self)
 
void discord_guild_application_command_permissions_cleanup (struct discord_guild_application_command_permissions *self)
 
void discord_application_command_permission_init (struct discord_application_command_permission *self)
 
void discord_application_command_permission_cleanup (struct discord_application_command_permission *self)
 
void discord_application_command_permissions_cleanup (struct discord_application_command_permissions *self)
 
void discord_create_global_application_command_init (struct discord_create_global_application_command *self)
 
void discord_create_global_application_command_cleanup (struct discord_create_global_application_command *self)
 
void discord_edit_global_application_command_init (struct discord_edit_global_application_command *self)
 
void discord_edit_global_application_command_cleanup (struct discord_edit_global_application_command *self)
 
void discord_create_guild_application_command_init (struct discord_create_guild_application_command *self)
 
void discord_create_guild_application_command_cleanup (struct discord_create_guild_application_command *self)
 
void discord_edit_guild_application_command_init (struct discord_edit_guild_application_command *self)
 
void discord_edit_guild_application_command_cleanup (struct discord_edit_guild_application_command *self)
 
void discord_bulk_overwrite_guild_application_commands_init (struct discord_bulk_overwrite_guild_application_commands *self)
 
void discord_bulk_overwrite_guild_application_commands_cleanup (struct discord_bulk_overwrite_guild_application_commands *self)
 
long discord_application_command_from_jsmnf (jsmnf_pair *root, const char *js, struct discord_application_command *self)
 
size_t discord_application_command_from_json (const char buf[], size_t size, struct discord_application_command *self)
 
long discord_application_commands_from_jsmnf (jsmnf_pair *root, const char *js, struct discord_application_commands *self)
 
size_t discord_application_commands_from_json (const char buf[], size_t size, struct discord_application_commands *self)
 
long discord_guild_application_command_permissions_from_jsmnf (jsmnf_pair *root, const char *js, struct discord_guild_application_command_permissions *self)
 
size_t discord_guild_application_command_permissions_from_json (const char buf[], size_t size, struct discord_guild_application_command_permissions *self)
 
long discord_application_command_permission_from_jsmnf (jsmnf_pair *root, const char *js, struct discord_application_command_permission *self)
 
size_t discord_application_command_permission_from_json (const char buf[], size_t size, struct discord_application_command_permission *self)
 
long discord_application_command_permissions_from_jsmnf (jsmnf_pair *root, const char *js, struct discord_application_command_permissions *self)
 
size_t discord_application_command_permissions_from_json (const char buf[], size_t size, struct discord_application_command_permissions *self)
 
long discord_create_global_application_command_from_jsmnf (jsmnf_pair *root, const char *js, struct discord_create_global_application_command *self)
 
size_t discord_create_global_application_command_from_json (const char buf[], size_t size, struct discord_create_global_application_command *self)
 
long discord_edit_global_application_command_from_jsmnf (jsmnf_pair *root, const char *js, struct discord_edit_global_application_command *self)
 
size_t discord_edit_global_application_command_from_json (const char buf[], size_t size, struct discord_edit_global_application_command *self)
 
long discord_create_guild_application_command_from_jsmnf (jsmnf_pair *root, const char *js, struct discord_create_guild_application_command *self)
 
size_t discord_create_guild_application_command_from_json (const char buf[], size_t size, struct discord_create_guild_application_command *self)
 
long discord_edit_guild_application_command_from_jsmnf (jsmnf_pair *root, const char *js, struct discord_edit_guild_application_command *self)
 
size_t discord_edit_guild_application_command_from_json (const char buf[], size_t size, struct discord_edit_guild_application_command *self)
 
long discord_bulk_overwrite_guild_application_commands_from_jsmnf (jsmnf_pair *root, const char *js, struct discord_bulk_overwrite_guild_application_commands *self)
 
size_t discord_bulk_overwrite_guild_application_commands_from_json (const char buf[], size_t size, struct discord_bulk_overwrite_guild_application_commands *self)
 
jsonbcode discord_application_command_to_jsonb (jsonb *b, char buf[], size_t size, const struct discord_application_command *self)
 
size_t discord_application_command_to_json (char buf[], size_t size, const struct discord_application_command *self)
 
jsonbcode discord_application_commands_to_jsonb (jsonb *b, char buf[], size_t size, const struct discord_application_commands *self)
 
size_t discord_application_commands_to_json (char buf[], size_t size, const struct discord_application_commands *self)
 
jsonbcode discord_guild_application_command_permissions_to_jsonb (jsonb *b, char buf[], size_t size, const struct discord_guild_application_command_permissions *self)
 
size_t discord_guild_application_command_permissions_to_json (char buf[], size_t size, const struct discord_guild_application_command_permissions *self)
 
jsonbcode discord_application_command_permission_to_jsonb (jsonb *b, char buf[], size_t size, const struct discord_application_command_permission *self)
 
size_t discord_application_command_permission_to_json (char buf[], size_t size, const struct discord_application_command_permission *self)
 
jsonbcode discord_application_command_permissions_to_jsonb (jsonb *b, char buf[], size_t size, const struct discord_application_command_permissions *self)
 
size_t discord_application_command_permissions_to_json (char buf[], size_t size, const struct discord_application_command_permissions *self)
 
jsonbcode discord_create_global_application_command_to_jsonb (jsonb *b, char buf[], size_t size, const struct discord_create_global_application_command *self)
 
size_t discord_create_global_application_command_to_json (char buf[], size_t size, const struct discord_create_global_application_command *self)
 
jsonbcode discord_edit_global_application_command_to_jsonb (jsonb *b, char buf[], size_t size, const struct discord_edit_global_application_command *self)
 
size_t discord_edit_global_application_command_to_json (char buf[], size_t size, const struct discord_edit_global_application_command *self)
 
jsonbcode discord_create_guild_application_command_to_jsonb (jsonb *b, char buf[], size_t size, const struct discord_create_guild_application_command *self)
 
size_t discord_create_guild_application_command_to_json (char buf[], size_t size, const struct discord_create_guild_application_command *self)
 
jsonbcode discord_edit_guild_application_command_to_jsonb (jsonb *b, char buf[], size_t size, const struct discord_edit_guild_application_command *self)
 
size_t discord_edit_guild_application_command_to_json (char buf[], size_t size, const struct discord_edit_guild_application_command *self)
 
jsonbcode discord_bulk_overwrite_guild_application_commands_to_jsonb (jsonb *b, char buf[], size_t size, const struct discord_bulk_overwrite_guild_application_commands *self)
 
size_t discord_bulk_overwrite_guild_application_commands_to_json (char buf[], size_t size, const struct discord_bulk_overwrite_guild_application_commands *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_application_command_types

Enumerator
DISCORD_APPLICATION_CHAT_INPUT 

Slash commands: a text-based command that shows up when a user types /

DISCORD_APPLICATION_USER 

A UI-based command that shows up when a user right clicks or taps on another user

DISCORD_APPLICATION_MESSAGE 

A UI-based command that shows up when a user right clicks or tap on a message

◆ discord_application_command_option_types

Enumerator
DISCORD_APPLICATION_OPTION_SUB_COMMAND 
DISCORD_APPLICATION_OPTION_SUB_COMMAND_GROUP 
DISCORD_APPLICATION_OPTION_STRING 
DISCORD_APPLICATION_OPTION_INTEGER 

Any integer between -2^53 and 2^53

DISCORD_APPLICATION_OPTION_BOOLEAN 
DISCORD_APPLICATION_OPTION_USER 
DISCORD_APPLICATION_OPTION_CHANNEL 

Includes all channel types + categories

DISCORD_APPLICATION_OPTION_ROLE 
DISCORD_APPLICATION_OPTION_MENTIONABLE 

Includes users and roles

DISCORD_APPLICATION_OPTION_NUMBER 

Any double between -2^53 and 2^53

DISCORD_APPLICATION_OPTION_ATTACHMENT 

discord_attachment object

◆ discord_application_command_permission_types

Enumerator
DISCORD_APPLICATION_PERMISSION_ROLE 
DISCORD_APPLICATION_PERMISSION_USER 
DISCORD_APPLICATION_PERMISSION_CHANNEL 

Function Documentation

◆ discord_application_command_init()

void discord_application_command_init ( struct discord_application_command self)

◆ discord_application_command_cleanup()

void discord_application_command_cleanup ( struct discord_application_command self)

◆ discord_application_commands_cleanup()

void discord_application_commands_cleanup ( struct discord_application_commands self)

◆ discord_guild_application_command_permissions_cleanup()

void discord_guild_application_command_permissions_cleanup ( struct discord_guild_application_command_permissions self)

◆ discord_application_command_permission_init()

void discord_application_command_permission_init ( struct discord_application_command_permission self)

◆ discord_application_command_permission_cleanup()

void discord_application_command_permission_cleanup ( struct discord_application_command_permission self)

◆ discord_application_command_permissions_cleanup()

void discord_application_command_permissions_cleanup ( struct discord_application_command_permissions self)

◆ discord_create_global_application_command_init()

void discord_create_global_application_command_init ( struct discord_create_global_application_command self)

◆ discord_create_global_application_command_cleanup()

void discord_create_global_application_command_cleanup ( struct discord_create_global_application_command self)

◆ discord_edit_global_application_command_init()

void discord_edit_global_application_command_init ( struct discord_edit_global_application_command self)

◆ discord_edit_global_application_command_cleanup()

void discord_edit_global_application_command_cleanup ( struct discord_edit_global_application_command self)

◆ discord_create_guild_application_command_init()

void discord_create_guild_application_command_init ( struct discord_create_guild_application_command self)

◆ discord_create_guild_application_command_cleanup()

void discord_create_guild_application_command_cleanup ( struct discord_create_guild_application_command self)

◆ discord_edit_guild_application_command_init()

void discord_edit_guild_application_command_init ( struct discord_edit_guild_application_command self)

◆ discord_edit_guild_application_command_cleanup()

void discord_edit_guild_application_command_cleanup ( struct discord_edit_guild_application_command self)

◆ discord_bulk_overwrite_guild_application_commands_init()

void discord_bulk_overwrite_guild_application_commands_init ( struct discord_bulk_overwrite_guild_application_commands self)

◆ discord_bulk_overwrite_guild_application_commands_cleanup()

void discord_bulk_overwrite_guild_application_commands_cleanup ( struct discord_bulk_overwrite_guild_application_commands self)

◆ discord_application_command_from_jsmnf()

long discord_application_command_from_jsmnf ( jsmnf_pair *  root,
const char *  js,
struct discord_application_command self 
)

◆ discord_application_command_from_json()

size_t discord_application_command_from_json ( const char  buf[],
size_t  size,
struct discord_application_command self 
)

◆ discord_application_commands_from_jsmnf()

long discord_application_commands_from_jsmnf ( jsmnf_pair *  root,
const char *  js,
struct discord_application_commands self 
)

◆ discord_application_commands_from_json()

size_t discord_application_commands_from_json ( const char  buf[],
size_t  size,
struct discord_application_commands self 
)

◆ discord_guild_application_command_permissions_from_jsmnf()

long discord_guild_application_command_permissions_from_jsmnf ( jsmnf_pair *  root,
const char *  js,
struct discord_guild_application_command_permissions self 
)

◆ discord_guild_application_command_permissions_from_json()

size_t discord_guild_application_command_permissions_from_json ( const char  buf[],
size_t  size,
struct discord_guild_application_command_permissions self 
)

◆ discord_application_command_permission_from_jsmnf()

long discord_application_command_permission_from_jsmnf ( jsmnf_pair *  root,
const char *  js,
struct discord_application_command_permission self 
)

◆ discord_application_command_permission_from_json()

size_t discord_application_command_permission_from_json ( const char  buf[],
size_t  size,
struct discord_application_command_permission self 
)

◆ discord_application_command_permissions_from_jsmnf()

long discord_application_command_permissions_from_jsmnf ( jsmnf_pair *  root,
const char *  js,
struct discord_application_command_permissions self 
)

◆ discord_application_command_permissions_from_json()

size_t discord_application_command_permissions_from_json ( const char  buf[],
size_t  size,
struct discord_application_command_permissions self 
)

◆ discord_create_global_application_command_from_jsmnf()

long discord_create_global_application_command_from_jsmnf ( jsmnf_pair *  root,
const char *  js,
struct discord_create_global_application_command self 
)

◆ discord_create_global_application_command_from_json()

size_t discord_create_global_application_command_from_json ( const char  buf[],
size_t  size,
struct discord_create_global_application_command self 
)

◆ discord_edit_global_application_command_from_jsmnf()

long discord_edit_global_application_command_from_jsmnf ( jsmnf_pair *  root,
const char *  js,
struct discord_edit_global_application_command self 
)

◆ discord_edit_global_application_command_from_json()

size_t discord_edit_global_application_command_from_json ( const char  buf[],
size_t  size,
struct discord_edit_global_application_command self 
)

◆ discord_create_guild_application_command_from_jsmnf()

long discord_create_guild_application_command_from_jsmnf ( jsmnf_pair *  root,
const char *  js,
struct discord_create_guild_application_command self 
)

◆ discord_create_guild_application_command_from_json()

size_t discord_create_guild_application_command_from_json ( const char  buf[],
size_t  size,
struct discord_create_guild_application_command self 
)

◆ discord_edit_guild_application_command_from_jsmnf()

long discord_edit_guild_application_command_from_jsmnf ( jsmnf_pair *  root,
const char *  js,
struct discord_edit_guild_application_command self 
)

◆ discord_edit_guild_application_command_from_json()

size_t discord_edit_guild_application_command_from_json ( const char  buf[],
size_t  size,
struct discord_edit_guild_application_command self 
)

◆ discord_bulk_overwrite_guild_application_commands_from_jsmnf()

long discord_bulk_overwrite_guild_application_commands_from_jsmnf ( jsmnf_pair *  root,
const char *  js,
struct discord_bulk_overwrite_guild_application_commands self 
)

◆ discord_bulk_overwrite_guild_application_commands_from_json()

size_t discord_bulk_overwrite_guild_application_commands_from_json ( const char  buf[],
size_t  size,
struct discord_bulk_overwrite_guild_application_commands self 
)

◆ discord_application_command_to_jsonb()

jsonbcode discord_application_command_to_jsonb ( jsonb b,
char  buf[],
size_t  size,
const struct discord_application_command self 
)

◆ discord_application_command_to_json()

size_t discord_application_command_to_json ( char  buf[],
size_t  size,
const struct discord_application_command self 
)

◆ discord_application_commands_to_jsonb()

jsonbcode discord_application_commands_to_jsonb ( jsonb b,
char  buf[],
size_t  size,
const struct discord_application_commands self 
)

◆ discord_application_commands_to_json()

size_t discord_application_commands_to_json ( char  buf[],
size_t  size,
const struct discord_application_commands self 
)

◆ discord_guild_application_command_permissions_to_jsonb()

jsonbcode discord_guild_application_command_permissions_to_jsonb ( jsonb b,
char  buf[],
size_t  size,
const struct discord_guild_application_command_permissions self 
)

◆ discord_guild_application_command_permissions_to_json()

size_t discord_guild_application_command_permissions_to_json ( char  buf[],
size_t  size,
const struct discord_guild_application_command_permissions self 
)

◆ discord_application_command_permission_to_jsonb()

jsonbcode discord_application_command_permission_to_jsonb ( jsonb b,
char  buf[],
size_t  size,
const struct discord_application_command_permission self 
)

◆ discord_application_command_permission_to_json()

size_t discord_application_command_permission_to_json ( char  buf[],
size_t  size,
const struct discord_application_command_permission self 
)

◆ discord_application_command_permissions_to_jsonb()

jsonbcode discord_application_command_permissions_to_jsonb ( jsonb b,
char  buf[],
size_t  size,
const struct discord_application_command_permissions self 
)

◆ discord_application_command_permissions_to_json()

size_t discord_application_command_permissions_to_json ( char  buf[],
size_t  size,
const struct discord_application_command_permissions self 
)

◆ discord_create_global_application_command_to_jsonb()

jsonbcode discord_create_global_application_command_to_jsonb ( jsonb b,
char  buf[],
size_t  size,
const struct discord_create_global_application_command self 
)

◆ discord_create_global_application_command_to_json()

size_t discord_create_global_application_command_to_json ( char  buf[],
size_t  size,
const struct discord_create_global_application_command self 
)

◆ discord_edit_global_application_command_to_jsonb()

jsonbcode discord_edit_global_application_command_to_jsonb ( jsonb b,
char  buf[],
size_t  size,
const struct discord_edit_global_application_command self 
)

◆ discord_edit_global_application_command_to_json()

size_t discord_edit_global_application_command_to_json ( char  buf[],
size_t  size,
const struct discord_edit_global_application_command self 
)

◆ discord_create_guild_application_command_to_jsonb()

jsonbcode discord_create_guild_application_command_to_jsonb ( jsonb b,
char  buf[],
size_t  size,
const struct discord_create_guild_application_command self 
)

◆ discord_create_guild_application_command_to_json()

size_t discord_create_guild_application_command_to_json ( char  buf[],
size_t  size,
const struct discord_create_guild_application_command self 
)

◆ discord_edit_guild_application_command_to_jsonb()

jsonbcode discord_edit_guild_application_command_to_jsonb ( jsonb b,
char  buf[],
size_t  size,
const struct discord_edit_guild_application_command self 
)

◆ discord_edit_guild_application_command_to_json()

size_t discord_edit_guild_application_command_to_json ( char  buf[],
size_t  size,
const struct discord_edit_guild_application_command self 
)

◆ discord_bulk_overwrite_guild_application_commands_to_jsonb()

jsonbcode discord_bulk_overwrite_guild_application_commands_to_jsonb ( jsonb b,
char  buf[],
size_t  size,
const struct discord_bulk_overwrite_guild_application_commands self 
)

◆ discord_bulk_overwrite_guild_application_commands_to_json()

size_t discord_bulk_overwrite_guild_application_commands_to_json ( char  buf[],
size_t  size,
const struct discord_bulk_overwrite_guild_application_commands self 
)