Hello !
On this code :
import { Listener } from "@sapphire/framework";
export class ReadyListeners extends Listener {
constructor(context, options) {
super(context, {
...options,
once: true,
});
}
async run(client) {
console.log("Are you readyy ?");
}
}
I have this error:
1|common | Error [UNLOADED_PIECE]: The piece 'ready' does not exist.
1|common | at _ListenerStore.resolve (file:///home/mathie/node_modules/@sapphire/pieces/dist/esm/lib/structures/Store.mjs:207:15)
1|common | at _ListenerStore.unload (file:///home/mathie/node_modules/@sapphire/pieces/dist/esm/lib/structures/Store.mjs:148:24)
1|common | at ReadyListeners.unload (file:///home/mathie/node_modules/@sapphire/pieces/dist/esm/lib/structures/Piece.mjs:58:22)
1|common | at ReadyListeners._runOnce (file:///home/mathie/node_modules/@sapphire/framework/dist/esm/lib/structures/Listener.mjs:29:16) {
1|common | type: 'UNLOADED_PIECE'
1|common | }
When I remove once, it's working
Why?
Thanks!