Edit Message#

ORCAcode discord_edit_message(struct discord *client, u64_snowflake_t channel_id, u64_snowflake_t message_id, struct discord_edit_message_params *params, struct discord_message *ret)#

Edit a previously sent message.

Parameters:
  • client – the client created with discord_init()

  • channel_id – the channel that the message belongs to

  • message_id – the message that will be purged of reactions from particular emoji

  • 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_edit_message_params#

Methods

  • Initializer:

    • void discord_edit_message_params_init(struct discord_edit_message_params *)

  • Cleanup:

    • void discord_edit_message_params_cleanup(struct discord_edit_message_params *)

    • void discord_edit_message_params_list_free(struct discord_edit_message_params **)

  • JSON Decoder:

    • void discord_edit_message_params_from_json(char *rbuf, size_t len, struct discord_edit_message_params *)

    • void discord_edit_message_params_list_from_json(char *rbuf, size_t len, struct discord_edit_message_params ***)

  • JSON Encoder:

    • void discord_edit_message_params_to_json(char *wbuf, size_t len, struct discord_edit_message_params *)

    • void discord_edit_message_params_list_to_json(char *wbuf, size_t len, struct discord_edit_message_params **)

Public Members

char *content#

the message contents (up to 2000 characters)

struct discord_embed **embeds#

embedded rich content (up to 6000 characters)

struct discord_embed *embed#

embedded rich content, deprecated in favor of embeds

enum discord_message_flags flags#

edit the flags of a message

struct discord_allowed_mentions *allowed_mentions#

allowed mentions for the message

struct discord_attachment **attachments#

attached files to keep

struct discord_component **components#

the components to include with the message