ctx.tools. Empty by default: augment it so values registered with
bot.provide(name, value) are typed in every handler.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Interface exported by @botmesh/core.
ctx.tools. Empty by default: augment it so values registered with
bot.provide(name, value) are typed in every handler.
declare module '@botmesh/core' {
interface DefaultTools {
prices: Map<string, number>
}
}
bot.provide('prices', new Map([['cake', 12]]))
bot.when('price', (ctx) => ctx.reply(String(ctx.tools.prices.get('cake'))))