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
31intentsadapterusersguildsmembersvoiceStatesoverwritesrolesemojischannelsstickerspresencesstageInstancesmessagesbans__logger__pluginResourceNamespluginResourcePacketHandlerspluginResourcePacketErrorLoggerhasGuildsIntenthasRolesIntenthasChannelsIntenthasGuildMembersIntenthasGuildExpressionsIntenthasVoiceStatesIntenthasPresenceUpdateshasDirectMessageshasModerationIntentonPacketWithPluginResourcestestUsersAndMemberstestChannelsAndOverwrites
Methods
10Properties
intents: number;adapter: Adapter;users?: Users;guilds?: Guilds;members?: Members;voiceStates?: VoiceStates;overwrites?: Overwrites;roles?: Roles;emojis?: Emojis;channels?: Channels;stickers?: Stickers;presences?: Presences;stageInstances?: StageInstances;messages?: Messages;bans?: Bans;__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 onPacketWithPluginResources;private testUsersAndMembers;private testChannelsAndOverwrites;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: (readonly [ CacheFrom, NonGuildBased, any, string] | readonly [ CacheFrom, GuildBased | GuildRelated, any, string, string])[]): Promise<void>;bulkSet(keys: (readonly [ CacheFrom, NonGuildBased, any, string] | readonly [ CacheFrom, GuildBased | GuildRelated, any, string, string])[]): Promise<void>;onPacket(event: GatewayDispatchPayload): Promise<void>;protected onPacketDefault(event: GatewayDispatchPayload): Promise<void>;testAdapter(): Promise<void>;