Skip to content

Commit 61b4d66

Browse files
kyranetfavna
authored andcommittedNov 16, 2023
feat: make all pieces virtual
1 parent 65bd0db commit 61b4d66

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { container } from '@sapphire/pieces';
2+
import { PluginListener as PluginMessageUpdate } from './PluginMessageUpdate';
3+
4+
export function loadListeners() {
5+
const store = 'listeners' as const;
6+
void container.stores.loadPiece({ name: 'PluginMessageUpdate', piece: PluginMessageUpdate, store });
7+
}

‎packages/editable-commands/src/register.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Plugin, postInitialization, SapphireClient } from '@sapphire/framework';
2-
import { join } from 'path';
2+
import { loadListeners } from './listeners/_load';
33

44
/**
55
* @since 1.0.0
@@ -9,7 +9,7 @@ export class EditableCommandsPlugin extends Plugin {
99
* @since 1.0.0
1010
*/
1111
public static [postInitialization](this: SapphireClient): void {
12-
this.stores.get('listeners').registerPath(join(__dirname, 'listeners'));
12+
loadListeners();
1313
}
1414
}
1515

0 commit comments

Comments
 (0)
Please sign in to comment.