Utilities
applyDecoratorsComposes several class or method decorators into one.
cooldownMessageThe wait before a cooldown allows another call, in plain English, such as "Slow down: try again in 12s.": the message of a
CooldownError, for logs and tests.cooldownStoreMessageThe answer the built-in fallback gives a call
CooldownStoreErrorrefused, in English.createMetadataCreates a typed decorator for facts about a handler that guards and other stages read.
createTokenCreates a token to provide and inject a value by, typed with what it provides.
ExecutionContextDescribes one handler call: which controller and method run, with which arguments, and the metadata on them.
factoryProviderMakes a factory provider whose function is typed from its
injectlist and its token.getInstallContextReports where an interaction happened and whether the bot is present there.
isExplainedErrorWhether MeoCord has already logged what went wrong and what to do about it.
LoggerPrints timestamped lines to the console, each named with the app and a context, at a level the config can hide.
routeMakes a typed route from a customId pattern, so one declaration serves the handler and the ids that reach it.
SetMetadataDeprecatedAttaches a value to a controller or a handler under a string key of your choosing.
ThemeCacheAn app's cache of the themes
@MeoCord({ themeFor })looked up, by server and by user.
Cooldown stores
CooldownStoreWhere
@Cooldowncounts calls.MemoryCooldownStoreCounts cooldown calls in this process's memory: the store
@Cooldownuses unless another is bound.RedisCooldownStoreA
CooldownStoreon Redis, or on any server that speaks its protocol and runs its Lua scripts.ShardedCooldownStoreA
CooldownStorefor process sharding that needs no database.
Localisation
createTranslatorCreates the application's translator from one catalog per locale.
defineCatalogDeclares a message catalog, keeping each message's text as its type so the params it takes can be checked.
translateErrorThe text MeoCord's fallback answers an error with, in a user's or a server's language.
TranslatorTranslates messages from one catalog per locale, typed by the default one.