seyfert
Version:
The most advanced framework for discord bots
28 lines (27 loc) • 1.56 kB
TypeScript
import type { UsingClient } from '../../../commands';
import type { GatewayIntentBits } from '../../../types';
import type { Cache, CacheFrom, ReturnCache } from '../../index';
export declare class BaseResource<T = any, S = any> {
protected cache: Cache;
readonly client: UsingClient;
namespace: string;
constructor(cache: Cache, client: UsingClient);
filter(data: any, id: string, from: CacheFrom): boolean;
get adapter(): import("../../index").Adapter;
removeIfNI(intent: keyof typeof GatewayIntentBits, id: string): import("../../../common").Awaitable<void>;
setIfNI(from: CacheFrom, intent: keyof typeof GatewayIntentBits, id: string, data: S): import("../../../common").Awaitable<void>;
get(id: string): ReturnCache<T | undefined>;
bulk(ids: string[]): ReturnCache<T[]>;
set(from: CacheFrom, id: string, data: S): import("../../../common").Awaitable<void>;
patch(from: CacheFrom, id: string, data: S): import("../../../common").Awaitable<void>;
remove(id: string): import("../../../common").Awaitable<void>;
keys(): ReturnCache<string[]>;
values(): ReturnCache<T[]>;
count(): ReturnCache<number>;
contains(id: string): ReturnCache<boolean>;
getToRelationship(): import("../../../common").Awaitable<string[]>;
addToRelationship(id: string | string[]): import("../../../common").Awaitable<void>;
removeToRelationship(id: string | string[]): import("../../../common").Awaitable<void>;
flush(): import("../../../common").Awaitable<void>;
hashId(id: string): string;
}