Concord - C Discord API library
A Discord API wrapper library written in C
discord_component Struct Reference

#include <message_components.h>

Collaboration diagram for discord_component:
[legend]

Data Fields

u64snowflake id
 
enum discord_component_types type
 
char * custom_id
 
u64snowflake sku_id
 
enum discord_component_styles style
 
char * label
 
struct discord_emojiemoji
 
char * url
 
struct discord_select_optionsoptions
 
char * placeholder
 
int min_values
 
int max_values
 
struct discord_componentscomponents
 
int min_length
 
int max_length
 
bool required
 
char * value
 
bool disabled
 
struct discord_componentaccessory
 
struct discord_component_mediamedia
 
char * content
 
char * description
 
bool spoiler
 
struct discord_component_itemsitems
 
struct discord_component_mediafile
 
bool divider
 
enum discord_component_spacing spacing
 
int color
 

Detailed Description

Field Documentation

◆ id

u64snowflake discord_component::id

unique identifier for the component

◆ type

enum discord_component_types discord_component::type

component type

Examples
components.c.

◆ custom_id

char* discord_component::custom_id

a developer-defined identifier for the component, max 100 characters

◆ sku_id

u64snowflake discord_component::sku_id

identifier for a purchasable SKU, only available when using premium-style buttons

◆ style

enum discord_component_styles discord_component::style

one of button or text styles

◆ label

char* discord_component::label

text that appears on the button, max 80 characters

◆ emoji

struct discord_emoji* discord_component::emoji

name, id, and animated

◆ url

char* discord_component::url

a url for link-style buttons

◆ options

struct discord_select_options* discord_component::options

the choices in the select, max 25

◆ placeholder

char* discord_component::placeholder

custom placeholder text if nothing is selected, max 100 characters

◆ min_values

int discord_component::min_values

the minimum number of items that must be chosen: default 1, min 0, max 25

◆ max_values

int discord_component::max_values

the maximum number of items that must be chosen: default 1, max 25

◆ components

struct discord_components* discord_component::components

a list of child components

◆ min_length

int discord_component::min_length

the minimum input length for a text input

◆ max_length

int discord_component::max_length

the maximum input length for a text input

◆ required

bool discord_component::required

whether this componentis required to be filled

◆ value

char* discord_component::value

a pre-filled value for this component

◆ disabled

bool discord_component::disabled

whether the component is disabled, default false

◆ accessory

struct discord_component* discord_component::accessory

an accessory component, can be Thumbnail or Button

Note
This field is only available when using components v2 flag

◆ media

struct discord_component_media* discord_component::media

the media item for the thumbnail

Note
This field is only available when using components v2 flag

◆ content

char* discord_component::content

the content of the text display component

Note
This field is only available when using components v2 flag

◆ description

char* discord_component::description

the description for the thumbnai

Note
This field is only available when using components v2 flag

◆ spoiler

bool discord_component::spoiler

whether the thumbnail/file/container is a spoiler

Note
This field is only available when using components v2 flag

◆ items

struct discord_component_items* discord_component::items

array of media gallery items

Note
This field is only available when using components v2 flag

◆ file

struct discord_component_media* discord_component::file

the file to be displayed, supports only attachment://<filename> references

Note
This field is only available when using components v2 flag

◆ divider

bool discord_component::divider

whether the separator is a divider

Note
This field is only available when using components v2 flag

◆ spacing

enum discord_component_spacing discord_component::spacing

spacing size for the separator

Note
This field is only available when using components v2 flag

◆ color

int discord_component::color

color code for the container

Note
This field is only available when using components v2 flag

The documentation for this struct was generated from the following file: