Commit 7b363a8c authored by nanahira's avatar nanahira

remove @Preset

parent 88e27075
This diff is collapsed.
...@@ -72,6 +72,6 @@ ...@@ -72,6 +72,6 @@
"testEnvironment": "node" "testEnvironment": "node"
}, },
"peerDependencies": { "peerDependencies": {
"koishi": "^4.12.1" "koishi": "^4.13.0"
} }
} }
...@@ -37,7 +37,6 @@ export const { ...@@ -37,7 +37,6 @@ export const {
UseEvent, UseEvent,
UseBeforeEvent, UseBeforeEvent,
UseMiddleware, UseMiddleware,
UsePreset,
UseInterval, UseInterval,
UseComponent, UseComponent,
} = methodDecorators; } = methodDecorators;
......
...@@ -203,7 +203,6 @@ export class KoishiRegistrar extends Registrar<Context> { ...@@ -203,7 +203,6 @@ export class KoishiRegistrar extends Registrar<Context> {
UsePreset: this.decorateMethod( UsePreset: this.decorateMethod(
'preset', 'preset',
({ ctx }, fun: I18n.Renderer, name: string) => { ({ ctx }, fun: I18n.Renderer, name: string) => {
ctx.i18n.preset(name, fun);
ctx.on('dispose', () => { ctx.on('dispose', () => {
delete ctx.i18n._presets[name]; delete ctx.i18n._presets[name];
}); });
......
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