Concord - C Discord API library
A Discord API wrapper library written in C
|
#include <message_components.h>
Data Fields | |
u64snowflake | id |
enum discord_component_types | type |
char * | custom_id |
u64snowflake | sku_id |
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 |
bool | disabled |
struct discord_component * | accessory |
struct discord_component_media * | media |
char * | content |
char * | description |
bool | spoiler |
struct discord_component_items * | items |
struct discord_component_media * | file |
bool | divider |
enum discord_component_spacing | spacing |
int | color |
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)
u64snowflake discord_component::id |
unique identifier for the component
enum discord_component_types discord_component::type |
component type
char* discord_component::custom_id |
a developer-defined identifier for the component, max 100 characters
u64snowflake discord_component::sku_id |
identifier for a purchasable SKU, only available when using premium-style buttons
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
bool discord_component::disabled |
whether the component is disabled, default false
struct discord_component* discord_component::accessory |
an accessory component, can be Thumbnail or Button
struct discord_component_media* discord_component::media |
the media item for the thumbnail
char* discord_component::content |
the content of the text display component
char* discord_component::description |
the description for the thumbnai
bool discord_component::spoiler |
whether the thumbnail/file/container is a spoiler
struct discord_component_items* discord_component::items |
array of media gallery items
struct discord_component_media* discord_component::file |
the file to be displayed, supports only attachment://<filename> references
bool discord_component::divider |
whether the separator is a divider
enum discord_component_spacing discord_component::spacing |
spacing size for the separator
int discord_component::color |
color code for the container