Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Function exported by @botmesh/core.
function definePlugin<TConfig>(spec): PluginSpec<TConfig>;
spec
install()
TConfig
Record
string
unknown
PluginSpec
const greeter = definePlugin<{ text?: string }>({ name: 'greeter', version: '1.0.0', install({ bot }, config) { bot.when('hello', (ctx) => ctx.reply(config?.text ?? 'Hi!')) }, }) bot.plug(greeter, { text: 'Welcome!' })