Commit 571492f1 authored by nanahira's avatar nanahira

trash

parent 5a28f3f3
import 'source-map-support/register';
import { Context } from 'koishi-core';
import type { Context } from 'koishi-core';
import { Config, MyPlugin } from './plugin';
export { Config } from './plugin';
......
import 'source-map-support/register';
import { PluginContext, Plugin, Apply } from 'koishi-dev-utils';
import type { Context } from 'koishi-core';
import _ from 'lodash';
interface Config {
export interface Config {
prefix: string;
}
@Plugin('my-plugin')
class MyPlugin extends PluginContext<Config> {
@Apply
init() {
this.command('echo <message:text>').action((argv, message) => {
return _.join([this.config.prefix, message], ':');
});
}
}
export = new MyPlugin();
export class MyPlugin {
name = 'my plugin';
apply(ctx: Context, config: Config) {}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment