Table of Contents

Class GatewayClientCache

Namespace
NetCord.Gateway
Assembly
NetCord.dll
public sealed record GatewayClientCache : IGatewayClientCache, IDisposable, IEquatable<GatewayClientCache>
Inheritance
GatewayClientCache
Implements
Inherited Members

Constructors

GatewayClientCache()

public GatewayClientCache()

GatewayClientCache(JsonGatewayClientCache, ulong, RestClient)

public GatewayClientCache(JsonGatewayClientCache jsonModel, ulong clientId, RestClient client)

Parameters

jsonModel JsonGatewayClientCache
clientId ulong
client RestClient

Properties

DMChannels

public IReadOnlyDictionary<ulong, DMChannel> DMChannels { get; }

Property Value

IReadOnlyDictionary<ulong, DMChannel>

Guilds

public IReadOnlyDictionary<ulong, Guild> Guilds { get; }

Property Value

IReadOnlyDictionary<ulong, Guild>

User

public CurrentUser? User { get; }

Property Value

CurrentUser

Methods

CacheCurrentUser(CurrentUser)

public IGatewayClientCache CacheCurrentUser(CurrentUser user)

Parameters

user CurrentUser

Returns

IGatewayClientCache

CacheDMChannel(DMChannel)

public IGatewayClientCache CacheDMChannel(DMChannel dMChannel)

Parameters

dMChannel DMChannel

Returns

IGatewayClientCache

CacheGuild(Guild)

public IGatewayClientCache CacheGuild(Guild guild)

Parameters

guild Guild

Returns

IGatewayClientCache

CacheGuildChannel(IGuildChannel)

public IGatewayClientCache CacheGuildChannel(IGuildChannel channel)

Parameters

channel IGuildChannel

Returns

IGatewayClientCache

CacheGuildEmojis(ulong, ImmutableDictionary<ulong, GuildEmoji>)

public IGatewayClientCache CacheGuildEmojis(ulong guildId, ImmutableDictionary<ulong, GuildEmoji> emojis)

Parameters

guildId ulong
emojis ImmutableDictionary<ulong, GuildEmoji>

Returns

IGatewayClientCache

CacheGuildScheduledEvent(GuildScheduledEvent)

public IGatewayClientCache CacheGuildScheduledEvent(GuildScheduledEvent scheduledEvent)

Parameters

scheduledEvent GuildScheduledEvent

Returns

IGatewayClientCache

CacheGuildStickers(ulong, ImmutableDictionary<ulong, GuildSticker>)

public IGatewayClientCache CacheGuildStickers(ulong guildId, ImmutableDictionary<ulong, GuildSticker> stickers)

Parameters

guildId ulong
stickers ImmutableDictionary<ulong, GuildSticker>

Returns

IGatewayClientCache

CacheGuildThread(GuildThread)

public IGatewayClientCache CacheGuildThread(GuildThread thread)

Parameters

thread GuildThread

Returns

IGatewayClientCache

CacheGuildUser(GuildUser)

public IGatewayClientCache CacheGuildUser(GuildUser user)

Parameters

user GuildUser

Returns

IGatewayClientCache

CacheGuildUsers(ulong, IEnumerable<GuildUser>)

public IGatewayClientCache CacheGuildUsers(ulong guildId, IEnumerable<GuildUser> users)

Parameters

guildId ulong
users IEnumerable<GuildUser>

Returns

IGatewayClientCache

CachePresence(Presence)

public IGatewayClientCache CachePresence(Presence presence)

Parameters

presence Presence

Returns

IGatewayClientCache

CachePresences(ulong, IEnumerable<Presence>)

public IGatewayClientCache CachePresences(ulong guildId, IEnumerable<Presence> presences)

Parameters

guildId ulong
presences IEnumerable<Presence>

Returns

IGatewayClientCache

CacheRole(Role)

public IGatewayClientCache CacheRole(Role role)

Parameters

role Role

Returns

IGatewayClientCache

CacheStageInstance(StageInstance)

public IGatewayClientCache CacheStageInstance(StageInstance stageInstance)

Parameters

stageInstance StageInstance

Returns

IGatewayClientCache

CacheVoiceState(VoiceState)

public IGatewayClientCache CacheVoiceState(VoiceState voiceState)

Parameters

voiceState VoiceState

Returns

IGatewayClientCache

Dispose()

public void Dispose()

Equals(GatewayClientCache?)

public bool Equals(GatewayClientCache? other)

Parameters

other GatewayClientCache

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

RemoveGuild(ulong)

public IGatewayClientCache RemoveGuild(ulong guildId)

Parameters

guildId ulong

Returns

IGatewayClientCache

RemoveGuildChannel(ulong, ulong)

public IGatewayClientCache RemoveGuildChannel(ulong guildId, ulong channelId)

Parameters

guildId ulong
channelId ulong

Returns

IGatewayClientCache

RemoveGuildScheduledEvent(ulong, ulong)

public IGatewayClientCache RemoveGuildScheduledEvent(ulong guildId, ulong scheduledEventId)

Parameters

guildId ulong
scheduledEventId ulong

Returns

IGatewayClientCache

RemoveGuildThread(ulong, ulong)

public IGatewayClientCache RemoveGuildThread(ulong guildId, ulong threadId)

Parameters

guildId ulong
threadId ulong

Returns

IGatewayClientCache

RemoveGuildUser(ulong, ulong)

public IGatewayClientCache RemoveGuildUser(ulong guildId, ulong userId)

Parameters

guildId ulong
userId ulong

Returns

IGatewayClientCache

RemoveRole(ulong, ulong)

public IGatewayClientCache RemoveRole(ulong guildId, ulong roleId)

Parameters

guildId ulong
roleId ulong

Returns

IGatewayClientCache

RemoveStageInstance(ulong, ulong)

public IGatewayClientCache RemoveStageInstance(ulong guildId, ulong stageInstanceId)

Parameters

guildId ulong
stageInstanceId ulong

Returns

IGatewayClientCache

RemoveVoiceState(ulong, ulong)

public IGatewayClientCache RemoveVoiceState(ulong guildId, ulong userId)

Parameters

guildId ulong
userId ulong

Returns

IGatewayClientCache

SyncGuildActiveThreads(ulong, ImmutableDictionary<ulong, GuildThread>)

public IGatewayClientCache SyncGuildActiveThreads(ulong guildId, ImmutableDictionary<ulong, GuildThread> threads)

Parameters

guildId ulong
threads ImmutableDictionary<ulong, GuildThread>

Returns

IGatewayClientCache

SyncGuilds(IReadOnlyList<ulong>)

public IGatewayClientCache SyncGuilds(IReadOnlyList<ulong> guildIds)

Parameters

guildIds IReadOnlyList<ulong>

Returns

IGatewayClientCache

ToJsonModel()

public JsonGatewayClientCache ToJsonModel()

Returns

JsonGatewayClientCache

ToString()

public override string ToString()

Returns

string

<Clone>$()

public GatewayClientCache <Clone>$()

Returns

GatewayClientCache

Operators

operator ==(GatewayClientCache?, GatewayClientCache?)

public static bool operator ==(GatewayClientCache? left, GatewayClientCache? right)

Parameters

left GatewayClientCache
right GatewayClientCache

Returns

bool

operator !=(GatewayClientCache?, GatewayClientCache?)

public static bool operator !=(GatewayClientCache? left, GatewayClientCache? right)

Parameters

left GatewayClientCache
right GatewayClientCache

Returns

bool