Skip to content
Functionrate-limiterv0.1.12

buildKey

Builds a rate-limit key from a prefix and scope parts, joined with :. A null or undefined part becomes 'global', so a missing scope (a DM's guild id) collapses into one shared bucket.

buildKey(
    prefix: string,
    parts: readonly (string | null | undefined)[]
): string

prefix

prefix: string

Names the bucket family, e.g. 'cooldown'.