6#ifndef API_MESSAGE_COMPONENTS_H
7#define API_MESSAGE_COMPONENTS_H
jsonbcode
json-builder return codes
Definition: json-build.h:34
jsonbcode discord_component_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_component *self)
size_t discord_select_options_from_json(const char buf[], size_t size, struct discord_select_options *self)
size_t discord_select_options_to_json(char buf[], size_t size, const struct discord_select_options *self)
void discord_component_cleanup(struct discord_component *self)
discord_component_styles
Definition: message_components.h:32
@ DISCORD_BUTTON_SECONDARY
Definition: message_components.h:37
@ DISCORD_TEXT_PARAGRAPH
Definition: message_components.h:48
@ DISCORD_BUTTON_LINK
Definition: message_components.h:43
@ DISCORD_BUTTON_DANGER
Definition: message_components.h:41
@ DISCORD_TEXT_SHORT
Definition: message_components.h:46
@ DISCORD_BUTTON_SUCCESS
Definition: message_components.h:39
@ DISCORD_BUTTON_PRIMARY
Definition: message_components.h:35
size_t discord_components_from_json(const char buf[], size_t size, struct discord_components *self)
size_t discord_component_from_json(const char buf[], size_t size, struct discord_component *self)
size_t discord_component_to_json(char buf[], size_t size, const struct discord_component *self)
long discord_select_options_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_select_options *self)
jsonbcode discord_select_options_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_select_options *self)
void discord_component_init(struct discord_component *self)
void discord_select_options_cleanup(struct discord_select_options *self)
discord_component_types
Definition: message_components.h:22
@ DISCORD_COMPONENT_BUTTON
Definition: message_components.h:26
@ DISCORD_COMPONENT_ACTION_ROW
Definition: message_components.h:24
@ DISCORD_COMPONENT_SELECT_MENU
Definition: message_components.h:28
@ DISCORD_COMPONENT_TEXT_INPUT
Definition: message_components.h:30
void discord_components_cleanup(struct discord_components *self)
jsonbcode discord_components_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_components *self)
long discord_components_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_components *self)
long discord_component_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_component *self)
size_t discord_components_to_json(char buf[], size_t size, const struct discord_components *self)
Definition: message_components.h:51
char * value
Definition: message_components.h:98
struct discord_components * components
Definition: message_components.h:89
int max_length
Definition: message_components.h:94
enum discord_component_types type
Definition: message_components.h:54
int max_values
Definition: message_components.h:85
struct discord_select_options * options
Definition: message_components.h:74
struct discord_emoji * emoji
Definition: message_components.h:68
bool required
Definition: message_components.h:96
char * label
Definition: message_components.h:65
char * custom_id
Definition: message_components.h:57
enum discord_component_styles style
Definition: message_components.h:62
char * placeholder
Definition: message_components.h:77
int min_values
Definition: message_components.h:81
bool disabled
Definition: message_components.h:59
char * url
Definition: message_components.h:71
int min_length
Definition: message_components.h:92
Definition: message_components.h:101
struct discord_component * array
Definition: message_components.h:102
int size
Definition: message_components.h:101
Definition: message_components.h:104
bool Default
Definition: message_components.h:116
char * description
Definition: message_components.h:110
char * label
Definition: message_components.h:106
struct discord_emoji * emoji
Definition: message_components.h:113
char * value
Definition: message_components.h:108
Definition: message_components.h:119
struct discord_select_option * array
Definition: message_components.h:120
int size
Definition: message_components.h:119
Handle for building a JSON string.
Definition: json-build.h:61