fix: guild scheduled events update (#1976)

This commit is contained in:
Quin Lynch
2021-12-20 12:42:28 -04:00
committed by GitHub
parent a2f57f8cc6
commit 8daa0b6c91
2 changed files with 3 additions and 1 deletions

View File

@@ -2640,7 +2640,7 @@ namespace Discord.WebSocket
return;
}
var before = guild.GetEvent(data.Id);
var before = guild.GetEvent(data.Id)?.Clone();
var beforeCacheable = new Cacheable<SocketGuildEvent, ulong>(before, data.Id, before != null, () => Task.FromResult((SocketGuildEvent)null));

View File

@@ -196,6 +196,8 @@ namespace Discord.WebSocket
public IAsyncEnumerable<IReadOnlyCollection<RestUser>> GetUsersAsync(ulong fromUserId, Direction dir, int limit = DiscordConfig.MaxGuildEventUsersPerBatch, RequestOptions options = null)
=> GuildHelper.GetEventUsersAsync(Discord, this, fromUserId, dir, limit, options);
internal SocketGuildEvent Clone() => MemberwiseClone() as SocketGuildEvent;
#region IGuildScheduledEvent
/// <inheritdoc/>