Member visibility
Filter class members by access level.
Seedcord(config: GatewayConfig)Seedcord(config: GatewayConfig)configBot configuration including paths and Discord client options
Throws:
A SeedcordError When attempting to create multiple instances (singleton)
public readonly config: GatewayConfigpublic readonly config: GatewayConfigisInitialized
plugins
public readonly rateLimiter: IRateLimiterpublic readonly rateLimiter: IRateLimiterSee also:IRateLimiter
public readonly shutdown: CoordinatedShutdownpublic readonly shutdown: CoordinatedShutdownSee also:CoordinatedShutdown
public readonly startup: CoordinatedStartuppublic readonly startup: CoordinatedStartupSee also:CoordinatedStartup
attach()
Attaches a plugin to this instance
Plugins provide external functionality and are initialized during the specified startup phase. The plugin instance becomes available as a property in corecore wherever it's available.
Make sure to augment the CoreCore interface with the plugin type to ensure TypeScript recognizes it and provides intellisense.
attach<Key, Ctor>(
this: this,
key: Key,
Plugin: Ctor,
startupPhase: StartupPhase,
args: PluginArgs<Ctor>
): this & Record<Key, InstanceType<Ctor>>attach<Key, Ctor>(
this: this,
key: Key,
Plugin: Ctor,
startupPhase: StartupPhase,
args: PluginArgs<Ctor>
): this & Record<Key, InstanceType<Ctor>>keyProperty name to access the plugin instance
PluginPlugin constructor class
startupPhaseWhen during startup to initialize this plugin (StartupPhase)
argsAdditional arguments to pass to the plugin constructor
KeyThe property name for accessing the plugin
CtorThe plugin constructor type
Throws:
A SeedcordError When called after initialization or if key already exists
Inherited from:Pluggable