#How can I get a channel's message history?

1 messages · Page 1 of 1 (latest)

gaunt cobalt
#

I've googled and searched the docs but I can't find anything. There's an attribute for the last message sent but that's it.

gaunt cobalt
#

Anyone?

rugged halo
#

I think there is an generator or iterable called history in the channel object. So you could use it as
[message for message in channel.history()] to get a list of all the messages.
I don't know if that does work but something like this should exist.

toxic fiber
#

async for message in ctx.channel.history(limit=amount):