Put edited message in cache if it's not in cache already ()

Closes  

In addition to the fix, now no error will be returned if the message
doesn't exist in the cache as that is a (relatively) normal occurrence
and isn't an indicator of an issue with the bot or its configuration
This commit is contained in:
Octol1ttle 2023-11-22 13:29:27 +05:00 committed by GitHub
parent b446c97311
commit f908919ac9
Signed by: GitHub
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,7 +72,8 @@ public class MessageEditedResponder : IResponder<IMessageUpdate>
cacheKey, ct);
if (!messageResult.IsDefined(out var message))
{
return Result.FromError(messageResult);
_ = _channelApi.GetChannelMessageAsync(channelId, messageId, ct);
return Result.FromSuccess();
}
if (message.Content == newContent)