Concord - C Discord API library
A Discord API wrapper library written in C
|
#include <message_components.h>
Data Fields | |
enum discord_component_types | type |
char * | custom_id |
bool | disabled |
enum discord_component_styles | style |
char * | label |
struct discord_emoji * | emoji |
char * | url |
struct discord_select_options * | options |
char * | placeholder |
int | min_values |
int | max_values |
struct discord_components * | components |
int | min_length |
int | max_length |
bool | required |
char * | value |
Public methods
discord_component_from_json(const char json[], size_t len, struct discord_component *this)
discord_component_from_jsmnf(jsmnf *root, const char json[], struct discord_component *this)
enum discord_component_types discord_component::type |
component type
char* discord_component::custom_id |
a developer-defined identifier for the component, max 100 characters
bool discord_component::disabled |
whether the component is disabled, default false
enum discord_component_styles discord_component::style |
one of button or text styles
char* discord_component::label |
text that appears on the button, max 80 characters
struct discord_emoji* discord_component::emoji |
name
, id
, and animated
char* discord_component::url |
a url for link-style buttons
struct discord_select_options* discord_component::options |
the choices in the select, max 25
char* discord_component::placeholder |
custom placeholder text if nothing is selected, max 100 characters
int discord_component::min_values |
the minimum number of items that must be chosen: default 1, min 0, max 25
int discord_component::max_values |
the maximum number of items that must be chosen: default 1, max 25
struct discord_components* discord_component::components |
a list of child components
int discord_component::min_length |
the minimum input length for a text input
int discord_component::max_length |
the maximum input length for a text input
bool discord_component::required |
whether this componentis required to be filled
char* discord_component::value |
a pre-filled value for this component