Changed message history retrieval methods to use IDs instead of message objects
Created by: jcryer
Summary
Changed DiscordChannel.LastMessageId into a DiscordMessage object and renamed to DiscordChannel.LastMessage.
Details
Proposing a fix for situations like this (now that GetMessagesAsync has been deprecated):
await c.GetMessagesBeforeAsync(await c.GetMessageAsync(c.LastMessageId), 5);
By changing to a system like this:
await c.GetMessagesBeforeAsync(c.LastMessage, 5);
This is where c
is a DiscordChannel, and is not the channel the command has been issued in.
Changes proposed
- Change LastMessageId into LastMessage (DiscordMessage object)
Pretty simple change, just thought it would simplify these situations.