Execute Webhook#
-
ORCAcode discord_execute_webhook(struct discord *client, u64_snowflake_t webhook_id, const char webhook_token[], struct discord_execute_webhook_params *params, struct discord_webhook *ret)#
- Parameters:
client – the client created with discord_init()
webhook_id – the webhook itself
webhook_token – the webhook token
params – request parameters
ret – if successful, a discord_webhook that should be free’d with
discord_webhook_cleanup()
- Returns:
ORCAcode for how the operation went, ORCA_OK means nothing out of the ordinary
-
struct discord_execute_webhook_params#
Methods
Initializer:
void discord_execute_webhook_params_init(struct discord_execute_webhook_params *)
Cleanup:
void discord_execute_webhook_params_cleanup(struct discord_execute_webhook_params *)
void discord_execute_webhook_params_list_free(struct discord_execute_webhook_params **)
JSON Decoder:
void discord_execute_webhook_params_from_json(char *rbuf, size_t len, struct discord_execute_webhook_params *)
void discord_execute_webhook_params_list_from_json(char *rbuf, size_t len, struct discord_execute_webhook_params ***)
JSON Encoder:
void discord_execute_webhook_params_to_json(char *wbuf, size_t len, struct discord_execute_webhook_params *)
void discord_execute_webhook_params_list_to_json(char *wbuf, size_t len, struct discord_execute_webhook_params **)
Public Members
-
bool wait#
cannot unescape an ill-formed string waits for server confirmation of message send before response, and returns the created message body (defaults to false; when false a message that i
-
u64_snowflake_t thread_id#
Send a message to the specified thread withing a webhook’s channel. The thread will automatically be unarchived
-
char *content#
the message contents (up to 2000 characters)
-
char *username#
override the default username of the webhook
-
char *avatar_url#
override the default avatar of the webhook
-
bool tts#
true if this is a TTS message
-
struct discord_embed *embeds#
embedded rich content
-
struct discord_allowed_mentions *allowed_mentions#
allowed mentions for the message
-
struct discord_component **components#
the components to include with the message
-
struct discord_attachment **attachments#
attached files to keep