Skip to content
GitHub

Glossary

MeoCord 4.1 · since 4.1.0

The words the Guide uses, what each means in MeoCord, and the chapter that explains it.

The words the Guide uses, and what each means in MeoCord.

Acknowledgement. The first answer to an interaction, which Discord requires within three seconds: a reply, a deferral, an update or a modal. See Responses.

Builder. A class decorated with @CommandBuilder that describes a command for Discord to register: its name, description and options. See Slash commands.

Catalog. The messages of one language, keyed by name, which a translator reads. The default catalog is typed, and a meocord group in any catalog translates MeoCord's own texts. See Localisation.

Component. A button, select menu or modal, which comes back to the bot with the customId it was given. See Buttons, selects and modals.

Container. Where MeoCord keeps the app's instances, and makes them for whatever injects them. See Services and injection.

Controller. A class decorated with @Controller whose methods are handlers. One instance serves the whole app. Commands, components, messages and reactions reach only the controllers in @MeoCord({ controllers }); such a handler on a service never runs, and the bot warns at startup. See Your first command.

Cooldown. A limit on how often a handler runs, per user, channel, server or everyone, and optionally apart for each value of the call with by. See Cooldowns.

Cooldown store. Where cooldowns count calls: the bot's memory by default, or the shard manager, Redis or a database of your own. See Cooldown stores.

customId pattern. A component's route, such as profile/{ownerId}/{uid}. The parts in braces become the handler's params. See Patterns.

Deferral. An acknowledgement that answers later: a deferred reply shows that the bot is thinking, and a deferred update leaves a component's message as it is. @Defer defers for a handler. See @Defer.

Development guild. The server that receives every command under meocord start --dev, where commands update at once. See Registering commands.

Dispatch. Finding the handler for what the bot receives, and running it. See Dispatch.

Exception filter. A class that handles the errors of the types it names, from any stage of a call or from the handler. See Exception filters.

Fallback. What answers an error no exception filter handles. After an interaction, a guard's reason, a cooldown, invalid input and a UserError are shown only to the user, and any other error gets a generic message and is logged. After a message, a usage error, a guard's reason, invalid input and a UserError are replied to, and an unexpected error is logged, and told to the author in a direct message only with dmOnError. It also answers an interaction no handler takes, "Command not found!", except an autocomplete, which gets an empty menu. See The built-in fallback.

Guard. A class that decides whether a handler runs. A new one is made for every call, unless it's bound: supplied by a provider, listed in services or injected by another class, in which case every call shares one instance. See Guards.

Handler. A method MeoCord calls for a command, component, autocomplete request, message, reaction or event.

Install context. Where an interaction happened, and how the app was installed there: a server, a direct message with the bot, or a user-installed app in another conversation. See Where the interaction happened.

Interceptor. A class that runs around a handler once its guards let the call through, for timing, logging or caching. See Interceptors.

Lock. What @Defer does to a component's message while its handler runs: it disables the controls, marks the one clicked, and puts them back afterwards. See @Defer.

Message command. A @MessageHandler with a pattern, such as roll {sides}, run for a message that matches it after the app's prefix, a mention of the bot when mention is on, or as it is when the app sets no prefix. See Message commands.

Metadata. A fact declared on a handler or a controller with a decorator that createMetadata makes, which guards, interceptors and the handler registry read. See Custom decorators.

Observer. A class told about every call MeoCord dispatches, and about interactions no handler matches: once it has settled, with how it ended and how long it took, and optionally as it starts. For metrics, audit logs and tracing. See Observers.

Params. What a handler receives after the interaction or message: a command's options, the parts of a customId pattern, a modal's fields, a select menu's values, or the params of a message pattern.

Pipe. A class that turns a handler's validated input into what the handler wants, such as an id into a record. See Validation and pipes.

Pipeline. Every stage MeoCord runs around a handler, in order. See How a call runs.

Presenter. A class that decides how MeoCord's own answers look: the loading view of @Defer, the error answer of the fallback, and the reply of the built-in !help. See Presenters.

Primary process. The one process that should do one-off work: the only process, or with process sharding the one running shard 0. onReady receives it as primary. See Lifecycle hooks.

Provider. A value, a class or a factory that @MeoCord({ providers }) supplies under a token, for classes to inject. See Providers.

Route. A customId pattern made with route(), which @Command takes and which builds the ids it matches. See Building customIds with a route.

Scope. Where commands are registered: globally, to listed servers, or to the development guild. See Registering commands. A message command's scope says instead where it works: 'guild', 'dm' or 'any'. See Aliases, descriptions and scope.

Service. A class decorated with @Service that holds logic or state for controllers and other services to inject. One instance serves the whole app. See Services and injection.

Shard. One of the gateway connections a large bot splits into. See Sharding.

Stage. One step of the pipeline: @Defer's acknowledgement, parsing a message's words, guards, the cooldown check, fetching what a message names, interceptors, validation, pipes, cooldowns and the lock. Exception filters surround them, and observers frame the whole call. See How a call runs.

Theme. The colours, emojis and button styles a bot's answers use, named by what they mean, such as danger. See Theming.

Token. The key a provider supplies a value under, and that @Inject(token) asks for: a class, a string, a symbol, or a typed token from createToken. See Providers.

Translator. What createTranslator returns: it picks the language for a message, from the user, the server or a locale you give it. Given to @MeoCord({ i18n }), it translates MeoCord's own texts too. See Localisation.

Typed param. A param whose pattern names its type, such as {count:int}, so the handler receives the value rather than its text. See Typed params.

UserError. An error for the user's own mistake, not logged as a fault. After an interaction it's shown only to the user who made the call; after a message it's a reply that doesn't ping the author. See Exception filters and UserError.