I would like to know how to get the first message in a channel.
But more preferably could you point me to the part of the documentation that explains this, please?
TextChannel has a history method.
If you type await channel.history() you can get all messages in that text channel. But this starts from last message. To start from first message, use oldest_first=True in method. Also you can limit the amount of message with a keyword argument limit.
How to get the first message in a channel