Instance Method

getMessages(from:with:then:)

Gets an array of messages from channel

Declaration

func getMessages(from channelId: Snowflake, with options: [String : Any]? = nil, then completion: @escaping ([Message]?, RequestError?) -> Void)

Parameters

channelId

Channel to get messages from

options

Dictionary containing optional options regarding how many messages, or when to get them

Option Params

  • around: Message Id to get messages around

  • before: Message Id to get messages before this one

  • after: Message Id to get messages after this one

  • limit: Number of how many messages you want to get (1-100)