Commit 870f0232 authored by nanahira's avatar nanahira

use onApply for tricky reasons

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