class Seedcord extends ServerHost<"http"> implements SeedcordInstanceMember visibility
Filter class members by access level.
Seedcord(config: HttpServerConfig)Throws:
A SeedcordError when another Seedcord exists in this process and has not shut down.
Throws:
A SeedcordError when the running Node or Bun is older than the range in engines.
Showing members with Protected visibility and higher.
public get applicationId(): stringpublic readonly config: HttpServerConfigpublic 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:ServerHost
startup
Add a task that runs while the bot starts.
readonly startup: Pick<CoordinatedStartup, 'addTask'>Inherited from:ServerHost
[Symbol.asyncDispose]()
Runs the coordinated shutdown without calling process.exit. A new Seedcord can be
constructed afterwards. await using calls this when its scope ends.
Inherited from:ServerHost
attach()
Attaches a plugin under key. Read the instance back as core[key]. seedcord codegen
writes the Core augmentation that types it there.
Put one dot in the key to nest the plugin under a group. 'services.users' reads back as
core.services.users. Each name holds one plugin or one group.
Startup runs each plugin's init() in attach order within its phase. A node bot starts in
start(). An edge bot starts on its first request.
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: AttachKeyAssert<Key, this>,
Plugin: AttachableCtor<Ctor, BotT, BotRt>,
args: PluginArgs<Ctor>
): this & Attached<Key, InstanceType<Ctor>>keyAlso the channel the plugin logs on, dots included.
argsWhatever your constructor takes after the host.
Throws:
A SeedcordError when you attach after the bot has started.
Throws:
A SeedcordTypeError when key is taken, reserved, or malformed.
Throws:
A SeedcordTypeError when the plugin extends Plugin from another copy of @seedcord/core.
Throws:
A SeedcordTypeError when the plugin's transport or runtime differs from this host and the types were bypassed.
Inherited from:PluginHost
Answers one request to the interactions endpoint. Mount it in your own server when the
config sets port: false.
Rejects with CoreFetchBeforeStart until start() is called. A request that arrives while
start() runs waits for all of startup, the command deploy included. Answers 503 once
shutdown begins or start() fails.
public async start(): Promise<this>