Seedcord
The HTTP-interactions bot host, a long-running node server around the engine.
Discovers handlers from config.bot.interactions.path, verifies and dispatches interactions on start(), and runs coordinated shutdown with an in-flight drain. The edge deploy path calls createSeedcord from a generated entry.
class Seedcord<Cfg extends HttpConfig = HttpConfig>
extends Pluggable<"http", RuntimeOfConfig<Cfg>>
implements Core, SeedcordInstanceMember visibility
Filter class members by access level.
Showing members with Protected visibility and higher.
Cfg
Cfg extends HttpConfig = HttpConfigpublic get applicationId(): stringpublic readonly config: CfgisInitialized
plugins
protected readonly plugins: PluginLike[]Inherited from:Pluggable
public readonly rateLimiter: IRateLimiterSee also:IRateLimiter
public readonly rest: RESTshutdown
Add a task that runs while the bot shuts down.
readonly shutdown: Pick<CoordinatedShutdown, 'addTask'>Inherited from:Pluggable
startFailed
startup
Add a task that runs while the bot starts.
readonly startup: Pick<CoordinatedStartup, 'addTask'>Inherited from:Pluggable
attach()
Attaches a plugin under key. Read the instance back as core[key]. seedcord codegen writes the Core augmentation that types it there.
Startup runs each plugin's init() in attach order within its phase.
Attaching a plugin whose transport or runtime differs from this host fails to compile. Your constructor takes CoreBase as its first parameter (you don't need to pass it though). A narrower one fails to compile here.
attach<Key, Ctor>(
this: this,
key: ChannelKeyAssert<Key>,
Plugin: Ctor &
TransportAssert<InstanceType<Ctor>, BotT> &
RuntimeAssert<InstanceType<Ctor>, BotRt> &
CoreParamAssert<Ctor>,
args: PluginArgs<Ctor>
): this & Record<Key, InstanceType<Ctor>>keyAlso the channel the plugin logs on. Reserved channel names throw.
argsWhatever your constructor takes after the host.
Throws:
A SeedcordError if you attach after the bot has started. A taken or reserved key throws too.
Inherited from:Pluggable
public async start(): Promise<this>