Back to Docs
Plugin Development
Creating a Plugin
Botatos plugins are TypeScript modules that extend the gateway's functionality.
Scaffold a Plugin
botatos plugin create my-plugin
Plugin Structure
import type { Plugin } from 'botatos/plugin-sdk';
const myPlugin: Plugin = {
name: 'my-plugin',
version: '1.0.0',
async onMessage(ctx) {
if (ctx.text.includes('hello')) {
await ctx.reply('Hello from my plugin!');
}
},
async onInstall() {
console.log('Plugin installed!');
},
};
export default myPlugin;
Publishing
botatos plugin publish
Your plugin will appear in the marketplace for others to install.