Skip to content
Functioncorev0.12.0

buildKey

Builds a rate-limit key from a prefix and scope parts, joined with :. A null or undefined part becomes 'global'. A key built from a DM's guild id reads <prefix>:global for every DM caller.

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

prefix

prefix: string

The bucket family, e.g. 'cooldown'.