Can i fetch every message from a channel?

Hello, i'm trying to make a bot that sends a random cat photo from the cat photos channel, but i don't know how i can get every message on the channel.
Was this page helpful?