Skip to content
GitHub

ControllerOptions

interface in meocord/interface Since 4.1.0

interface ControllerOptions

How @Controller treats a class: whether the handlers it declares take the stages of the classes it extends.

Members

inheritStages

inheritStages?: boolean

Whether the class-level guards, interceptors, filters and cooldowns of the classes this one extends also apply to the handlers it declares itself. false limits those handlers to this class's own class and method stages; handlers it inherits keep their base's stages either way.

Default: true

inheritedRoutes Since 4.2.0

inheritedRoutes?: 'keep' | 'replace'

What a handler this class re-decorates answers of the routes its base classes declare for it. 'keep' answers them as well as its own; 'replace' answers only the routes this class declares for it, of every kind: commands, component patterns, message patterns, reactions and autocompletes. A command no handler answers any more is not registered. A method overridden without decorators keeps every route it inherits either way.

Default: 'keep'`; the next major version (5.0) replaces them by default

See also

  • Controller