UNPKG

oebot

Version:

OEBot 命令行工具

41 lines (33 loc) 883 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ts_template = exports.ts_config = void 0; exports.ts_config = ` { "compilerOptions": { "target": "ES2020", "module": "CommonJS", "moduleResolution": "node", "resolveJsonModule": true, "esModuleInterop": true, "strict": true, "skipLibCheck": true } } `.trim(); exports.ts_template = ` import { OEPlugin, segment } from '@oebot/core' const { version } = require('./package.json') const plugin = new OEPlugin('xxx', version) const config = {} plugin.onMounted((bot, admins) => { plugin.saveConfig(Object.assign(config, plugin.loadConfig())) plugin.onMessage((event, bot) => { const { raw_message } = event if (raw_message === 'hello') { const msgs = [segment.face(66), 'world'] event.reply(msgs) } }) }) export { plugin } `.trim();