Cache
Signature
export declare class CachePrivate types
KeysTypeAlias
type Keys<T> = keyof T;BulkGetResultTypeAlias
type BulkGetResult<K extends BulkGetKey[0] = BulkGetKey[0]> = Partial<{ [P in K]: ReturnManagers[P][];}>;ReturnManagersTypeAlias
type ReturnManagers = { [K in NonGuildBased | GuildBased | GuildRelated]: NonNullable<Awaited<ReturnType<NonNullable<Cache[K]>['get']>>>;};Properties
30intentsadapterusersguildsmembersvoiceStatespresencesbansoverwritesrolesemojischannelsstickersstageInstancesmessages__logger__pluginResourceNamespluginResourcePacketHandlerspluginResourcePacketErrorLoggerhasGuildsIntenthasRolesIntenthasChannelsIntenthasGuildMembersIntenthasGuildExpressionsIntenthasVoiceStatesIntenthasPresenceUpdateshasDirectMessageshasModerationIntent_buildBulkWritesonPacketWithPluginResources
Methods
10Properties
intents: number;adapter: Adapter;users?: Users;guilds?: Guilds;members?: Members;voiceStates?: VoiceStates;presences?: Presences;bans?: Bans;overwrites?: Overwrites;roles?: Roles;emojis?: Emojis;channels?: Channels;stickers?: Stickers;stageInstances?: StageInstances;messages?: Messages;__logger__?: Logger;private pluginResourceNames;private pluginResourcePacketHandlers;private pluginResourcePacketErrorLogger?;hasGuildsIntentGetterget hasGuildsIntent(): boolean;hasRolesIntentGetterget hasRolesIntent(): boolean;hasChannelsIntentGetterget hasChannelsIntent(): boolean;hasGuildMembersIntentGetterget hasGuildMembersIntent(): boolean;get hasGuildExpressionsIntent(): boolean;hasVoiceStatesIntentGetterget hasVoiceStatesIntent(): boolean;hasPresenceUpdatesGetterget hasPresenceUpdates(): boolean;hasDirectMessagesGetterget hasDirectMessages(): boolean;hasModerationIntentGetterget hasModerationIntent(): boolean;private _buildBulkWrites;private onPacketWithPluginResources;Methods
constructorConstructorconstructor(intents: number, adapter: Adapter, disabledCache: DisabledCache, client: UsingClient);buildCache(disabledCache: DisabledCache, client: UsingClient): void;flush(): ReturnCache<void>;hasIntent(intent: keyof typeof GatewayIntentBits): boolean;bulkGet<const Keys extends readonly BulkGetKey[]>(keys: Keys): Promise<BulkGetResult<Keys[number][0]>>;bulkPatch(keys: BulkWriteKey[]): Promise<void>;bulkSet(keys: BulkWriteKey[]): Promise<void>;onPacket(event: GatewayDispatchPayload): Promise<void>;protected onPacketDefault(event: GatewayDispatchPayload): Promise<void>;testAdapter(): Promise<void>;Destructively validates the adapter by flushing its complete storage before, during, and after the run. This partial conformance check covers only users, members, channels, and permission overwrites.