Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Backend/Remora.Discord.Caching/Responders/EarlyCacheResponder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public class EarlyCacheResponder :
IResponder<IGuildMemberUpdate>,
IResponder<IGuildRoleCreate>,
IResponder<IGuildRoleUpdate>,
IResponder<IInviteCreate>,
IResponder<IMessageCreate>,
IResponder<IMessageUpdate>,
IResponder<IMessageReactionAdd>,
Expand Down Expand Up @@ -248,6 +249,15 @@ public async Task<Result> RespondAsync(IGuildRoleUpdate gatewayEvent, Cancellati
return await UpdateRolesList(gatewayEvent.GuildID, gatewayEvent.Role, ct);
}

/// <inheritdoc/>
public async Task<Result> RespondAsync(IInviteCreate gatewayEvent, CancellationToken ct = default)
{
var key = new KeyHelpers.InviteCacheKey(gatewayEvent.Code);
await _cacheService.CacheAsync(key, gatewayEvent, ct);

return Result.FromSuccess();
}

/// <inheritdoc/>
public async Task<Result> RespondAsync(IMessageCreate gatewayEvent, CancellationToken ct = default)
{
Expand Down
Loading