Commit 8c452830 authored by nanahira's avatar nanahira

adapt

parent d712980a
...@@ -5,6 +5,12 @@ import { YGOTournamentPluginConfigLike } from './config'; ...@@ -5,6 +5,12 @@ import { YGOTournamentPluginConfigLike } from './config';
export * from './config'; export * from './config';
export * from './plugin'; export * from './plugin';
declare module 'koishi' {
interface Modules {
ygotournament: typeof import('.');
}
}
export const name = 'ygotournament'; export const name = 'ygotournament';
const plugin = new YGOTournamentPlugin(); const plugin = new YGOTournamentPlugin();
export const schema = plugin.schema; export const schema = plugin.schema;
......
...@@ -284,7 +284,9 @@ export class YGOTournamentPlugin { ...@@ -284,7 +284,9 @@ export class YGOTournamentPlugin {
return; return;
} }
this.workaroundQuester(this.ctx.http); this.workaroundQuester(this.ctx.http);
this.ctx.cache.table('lateDeclarationTime', { maxAge: 3600 * 1000 }); this.ctx.on('service/cache', () => {
this.ctx.cache.table('lateDeclarationTime', { maxAge: 3600 * 1000 });
})
this.ctx this.ctx
.command('tournament/late', '迟到杀') .command('tournament/late', '迟到杀')
.shortcut('迟到杀') .shortcut('迟到杀')
......
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