Functionrate-limiterv0.1.0-next.3buildKeyBuilds a rate-limit key from a prefix and scope parts, joined with ::. A null or undefined part becomes 'global''global', so a missing scope (a DM's guild id) collapses into one shared bucket. buildKey( prefix: string, parts: readonly (string | null | undefined)[] ): stringbuildKey( prefix: string, parts: readonly (string | null | undefined)[] ): stringExamplesCopybuildKey('report', interaction.guildId); // 'report:1234...' or 'report:global' in a DMbuildKey('report', interaction.guildId); // 'report:1234...' or 'report:global' in a DMParamsprefixprefix: stringprefix: stringNames the bucket family, e.g. 'cooldown''cooldown'. partsparts: readonly (string | null | undefined)[]parts: readonly (string | null | undefined)[]Scope values, e.g. a user or guild id.
partsparts: readonly (string | null | undefined)[]parts: readonly (string | null | undefined)[]Scope values, e.g. a user or guild id.