Dynamic embed builder functions.
More...
|
| void | discord_embed_set_title (struct discord_embed *embed, char format[],...) |
| | Add title to embed. More...
|
| |
| void | discord_embed_set_description (struct discord_embed *embed, char format[],...) |
| | Add description to embed. More...
|
| |
| void | discord_embed_set_url (struct discord_embed *embed, char format[],...) |
| | Add URL to embed. More...
|
| |
| void | discord_embed_set_thumbnail (struct discord_embed *embed, char url[], char proxy_url[], int height, int width) |
| | Add thumbnail to embed. More...
|
| |
| void | discord_embed_set_image (struct discord_embed *embed, char url[], char proxy_url[], int height, int width) |
| | Add image to embed. More...
|
| |
| void | discord_embed_set_video (struct discord_embed *embed, char url[], char proxy_url[], int height, int width) |
| | Add video to embed. More...
|
| |
| void | discord_embed_set_footer (struct discord_embed *embed, char text[], char icon_url[], char proxy_icon_url[]) |
| | Add footer to embed. More...
|
| |
| void | discord_embed_set_provider (struct discord_embed *embed, char name[], char url[]) |
| | Add provider to embed. More...
|
| |
| void | discord_embed_set_author (struct discord_embed *embed, char name[], char url[], char icon_url[], char proxy_icon_url[]) |
| | Add author to embed. More...
|
| |
| void | discord_embed_add_field (struct discord_embed *embed, char name[], char value[], bool Inline) |
| | Add field to embed. More...
|
| |
Dynamic embed builder functions.
◆ discord_embed_set_title()
| void discord_embed_set_title |
( |
struct discord_embed * |
embed, |
|
|
char |
format[], |
|
|
|
... |
|
) |
| |
Add title to embed.
- Note
- the embed must be freed with
discord_embed_cleanup() after its no longer being used
- Parameters
-
| embed | the embed being modified |
| format | printf-like formatting string |
| ... | variadic arguments to be matched to format |
- Examples
- embed.c.
◆ discord_embed_set_description()
| void discord_embed_set_description |
( |
struct discord_embed * |
embed, |
|
|
char |
format[], |
|
|
|
... |
|
) |
| |
Add description to embed.
- Note
- the embed must be freed with
discord_embed_cleanup() after its no longer being used
- Parameters
-
| embed | the embed being modified |
| format | printf-like formatting string |
| ... | variadic arguments to be matched to format |
- Examples
- embed.c.
◆ discord_embed_set_url()
| void discord_embed_set_url |
( |
struct discord_embed * |
embed, |
|
|
char |
format[], |
|
|
|
... |
|
) |
| |
Add URL to embed.
- Note
- the embed must be freed with
discord_embed_cleanup() after its no longer being used
- Parameters
-
| embed | the embed being modified |
| format | printf-like formatting string |
| ... | variadic arguments to be matched to format |
- Examples
- embed.c.
◆ discord_embed_set_thumbnail()
| void discord_embed_set_thumbnail |
( |
struct discord_embed * |
embed, |
|
|
char |
url[], |
|
|
char |
proxy_url[], |
|
|
int |
height, |
|
|
int |
width |
|
) |
| |
Add thumbnail to embed.
- Note
- the embed must be freed with
discord_embed_cleanup() after its no longer being used
- Parameters
-
| embed | the embed being modified |
| url | source url of thumbnail |
| proxy_url | a proxied url of the thumbnail |
| height | height of thumbnail |
| width | width of thumbnail |
◆ discord_embed_set_image()
| void discord_embed_set_image |
( |
struct discord_embed * |
embed, |
|
|
char |
url[], |
|
|
char |
proxy_url[], |
|
|
int |
height, |
|
|
int |
width |
|
) |
| |
Add image to embed.
- Note
- the embed must be freed with
discord_embed_cleanup() after its no longer being used
- Parameters
-
| embed | the embed being modified |
| url | source url of image |
| proxy_url | a proxied url of the image |
| height | height of image |
| width | width of image |
- Examples
- embed.c.
◆ discord_embed_set_video()
| void discord_embed_set_video |
( |
struct discord_embed * |
embed, |
|
|
char |
url[], |
|
|
char |
proxy_url[], |
|
|
int |
height, |
|
|
int |
width |
|
) |
| |
Add video to embed.
- Note
- the embed must be freed with
discord_embed_cleanup() after its no longer being used
- Parameters
-
| embed | the embed being modified |
| url | source url of video |
| proxy_url | a proxied url of the video |
| height | height of video |
| width | width of video |
◆ discord_embed_set_footer()
| void discord_embed_set_footer |
( |
struct discord_embed * |
embed, |
|
|
char |
text[], |
|
|
char |
icon_url[], |
|
|
char |
proxy_icon_url[] |
|
) |
| |
Add footer to embed.
- Note
- the embed must be freed with
discord_embed_cleanup() after its no longer being used
- Parameters
-
| embed | the embed being modified |
| text | footer text |
| icon_url | url of footer icon |
| proxy_icon_url | a proxied url of footer icon |
- Examples
- embed.c.
◆ discord_embed_set_provider()
| void discord_embed_set_provider |
( |
struct discord_embed * |
embed, |
|
|
char |
name[], |
|
|
char |
url[] |
|
) |
| |
Add provider to embed.
- Note
- the embed must be freed with
discord_embed_cleanup() after its no longer being used
- Parameters
-
| embed | the embed being modified |
| name | name of provider |
| url | url of provider |
◆ discord_embed_set_author()
| void discord_embed_set_author |
( |
struct discord_embed * |
embed, |
|
|
char |
name[], |
|
|
char |
url[], |
|
|
char |
icon_url[], |
|
|
char |
proxy_icon_url[] |
|
) |
| |
Add author to embed.
- Note
- the embed must be freed with
discord_embed_cleanup() after its no longer being used
- Parameters
-
| embed | the embed being modified |
| name | name of author |
| url | url of author |
| icon_url | url of author icon |
| proxy_icon_url | a proxied url of author icon |
- Examples
- embed.c.
◆ discord_embed_add_field()
| void discord_embed_add_field |
( |
struct discord_embed * |
embed, |
|
|
char |
name[], |
|
|
char |
value[], |
|
|
bool |
Inline |
|
) |
| |
Add field to embed.
- Note
- the embed must be freed with
discord_embed_cleanup() after its no longer being used
- Parameters
-
| embed | the embed being modified |
| name | name of the field |
| value | value of the field |
| Inline | whether or not this field should display inline |
- Examples
- embed.c.