Optional
filterThe message to filter.
Optional
afterGet messages after this message ID. IDs don't need to be valid, an ID can be generated for any timestamp via Base#generateID.
Optional
beforeGet messages before this message ID. IDs don't need to be valid, an ID can be generated for any timestamp via Base#generateID.
Optional
limitThe maximum amount of messages to get. Defaults to 100. Use Infinity if you wish to get as many messages as possible.
A function used to reject certain messages. If
"break"
is returned, the iterator will immediately exit and yield the previously allowed messages.