Create Message#
- 
ORCAcode discord_create_message(struct discord *client, u64_snowflake_t channel_id, struct discord_create_message_params *params, struct discord_message *ret)#
- Post a message to a guild text or DM channel. - Note - Fires a - Message Createevent- Parameters:
- client – the client created with discord_init() 
- channel_id – the channel to send the message at 
- params – request parameters 
- ret – if successful, a discord_message that should be free’d with - discord_message_cleanup()
 
- Returns:
- ORCAcode for how the operation went, ORCA_OK means nothing out of the ordinary 
 
- 
struct discord_create_message_params#
- Methods - Initializer: - void discord_create_message_params_init(struct discord_create_message_params *)
 
- Cleanup: - void discord_create_message_params_cleanup(struct discord_create_message_params *)
- void discord_create_message_params_list_free(struct discord_create_message_params **)
 
- JSON Decoder: - void discord_create_message_params_from_json(char *rbuf, size_t len, struct discord_create_message_params *)
- void discord_create_message_params_list_from_json(char *rbuf, size_t len, struct discord_create_message_params ***)
 
- JSON Encoder: - void discord_create_message_params_to_json(char *wbuf, size_t len, struct discord_create_message_params *)
- void discord_create_message_params_list_to_json(char *wbuf, size_t len, struct discord_create_message_params **)
 
 - Public Members - 
char *content#
- the message contents (up to 2000 characters) 
 - 
bool tts#
- true if this is a TTS message 
 - 
struct discord_embed **embeds#
- embedded rich content (up to 6000 characters) 
 - 
struct discord_embed *embed#
- embedded rich content, deprecated in favor of embeds 
 - 
struct discord_allowed_mentions *allowed_mentions#
- allowed mentions for the message 
 - 
struct discord_message_reference *message_reference#
- include to make your message a reply 
 - 
struct discord_component **components#
- the components to include with the message 
 - 
ja_u64 **sticker_ids#
- ids of up to 3 stickers in the server to send in the message 
 - 
struct discord_attachment **attachments#
- attachment objects with filename and description