`DiscordChannel.GetMessagesAsync` throws exception when encountering a reply to a deleted message
Created by: ikegami
DiscordChannel.GetMessagesAsync
throws exception when it encounters a reply to a deleted message.
Code:
var msgs = await channel.GetMessagesAsync(100);
Channel's entire contents:
Result:
System.InvalidOperationException: Cannot access child value on Newtonsoft.Json.Linq.JValue.
at Newtonsoft.Json.Linq.JToken.get_Item(Object key)
at DSharpPlus.Net.DiscordApiClient.PrepareMessage(JToken msg_raw)
at DSharpPlus.Net.DiscordApiClient.GetChannelMessagesAsync(UInt64 channel_id, Int32 limit, Nullable`1 before, Nullable`1 after, Nullable`1 around)
at DSharpPlus.Entities.DiscordChannel.GetMessagesInternalAsync(Int32 limit, Nullable`1 before, Nullable`1 after, Nullable`1 around)
at [above call]
The problem goes away if I delete the bottom message.