Commit 870f0232 authored by nanahira's avatar nanahira

use onApply for tricky reasons

parent aec0b828
......@@ -11,7 +11,7 @@ import {
InjectLogger,
Inject,
UseEvent,
OnConnect,
OnApply,
} from 'koishi-thirdeye';
import { Attacker } from './attacker';
import moment from 'moment';
......@@ -39,7 +39,7 @@ const PROTOCOL_BASE64 = 'base64://';
name: 'hisoutensoku-jammer',
schema: HisoutensokuJammerPluginConfig,
})
export default class HisoutensokuJammerPlugin implements OnConnect {
export default class HisoutensokuJammerPlugin implements OnApply {
constructor(
private ctx: Context,
config: HisoutensokuJammerPluginConfigLike,
......@@ -51,7 +51,7 @@ export default class HisoutensokuJammerPlugin implements OnConnect {
@Inject('cache', true)
private cache: Cache;
onConnect() {
onApply() {
this.cache.table('lastMessages', { maxAge: 600000 });
}
......
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