Alchemy.Client.get_messages

You're seeing just the function get_messages, go back to Alchemy.Client module for more information.
Link to this function

get_messages(channel_id, options)

Specs

get_messages(snowflake(),
  around: snowflake(),
  before: snowflake(),
  after: snowflake(),
  limit: Integer
) :: {:ok, [Alchemy.Message.t()]} | {:error, term()}

Gets up to 100 messages from a channel.

around, before, after are all mutually exclusive.

Options

  • around will search for messages around the time of a particular message
  • before will get messages before a certain message
  • after will get messages after a certain message
  • limit the number of messages to get. Defaults to 100

Examples

{:ok, messages} = Client.get_messages(around: id, limit: 40)