UNPKG

sadbot

Version:

SadBot is a tooling _to thwart_ (someone/"somebot") from accomplishing an action in a given resource, it blocks, throttles and time-restricts the access like a security guard guy when the party is packed or you're not so sober to be welcome.

17 lines (16 loc) 630 B
import { RedisClientType } from '@node-redis/client'; export declare type SadBotBaseParams = { namespace?: string; prefix?: string; redisClient?: RedisClientType<Record<string, never>, Record<string, never>>; }; export declare abstract class SadBotBase { redisClient: RedisClientType<Record<string, never>, Record<string, never>>; namespace: string; prefix: string; constructor(params?: SadBotBaseParams); connectedRedisClient: () => Promise<RedisClientType>; basePrefix: () => string[]; basePrefixKey: () => string; resourcePrefixKey: (resourceId: string) => string; }