Skip to content

Commit

Permalink
Put edited message in cache if it's not in cache already (#196)
Browse files Browse the repository at this point in the history
Closes #183 

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
  • Loading branch information
Octol1ttle authored Nov 22, 2023
1 parent b446c97 commit f908919
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Responders/MessageEditedResponder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ public async Task<Result> RespondAsync(IMessageUpdate gatewayEvent, Cancellation
cacheKey, ct);
if (!messageResult.IsDefined(out var message))
{
return Result.FromError(messageResult);
_ = _channelApi.GetChannelMessageAsync(channelId, messageId, ct);
return Result.FromSuccess();
}

if (message.Content == newContent)
Expand Down

0 comments on commit f908919

Please sign in to comment.