Get Channel Messages

ORCAcode discord_get_channel_messages(struct discord *client, u64_snowflake_t channel_id, struct discord_get_channel_messages_params *params, struct discord_message ***ret)

Get messages for a given channel.

Note

If operating on a guild channel, this endpoint requires the VIEW_CHANNEL permission to be present on the current user

Note

If the current user is missing the READ_MESSAGE_HISTORY permission in the channel then this will return no messages (since they cannot read the message history)

Note

The before, after, and around keys are mutually exclusive, only one may be passed at a time

Parameters
  • client – the client created with discord_init()

  • channel_id – the channel to get messages from

  • params – request parameters

  • ret – if successful, a null-terminated list of discord_message, that should be free’d with discord_message_list_free()

Returns

ORCAcode for how the operation went, ORCA_OK means nothing out of the ordinary

Warning

doxygenstruct: Cannot find class “discord_get_channel_messages_params” in doxygen xml output for project “Orca” from directory: ../xml