Commit 10088f45 authored by nanahira's avatar nanahira

use onApply for tricky reasons

parent 762cba22
......@@ -33,7 +33,7 @@ declare module 'koishi' {
}
@KoishiPlugin({ name: 'tabulate', schema: TabulatePluginConfig })
export default class TabulatePlugin implements OnApply, OnConnect {
export default class TabulatePlugin implements OnApply {
constructor(private ctx: Context, config: TabulatePluginConfigLike) {}
async getGames(key: string) {
......@@ -64,18 +64,8 @@ export default class TabulatePlugin implements OnApply, OnConnect {
@Inject('cache', true)
private cache: Cache;
onConnect() {
this.cache.table('tabulateMatches', { maxAge: this.config.saveTime });
}
onApply() {
// patch tabulate specific rules
/*
this.ctx
.command('tabulate')
.option('rule', '--kof 使用 KOF 赛制', { value: '2/3【KOF】' })
.option('rule', '--head 使用人头赛赛制', { value: '人头赛' });
*/
this.cache.table('tabulateMatches', { maxAge: this.config.saveTime });
}
@UseCommand('tabulate', '排表')
......
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