Piece not loading when stores.register() is called
Code: https://github.com/UTCSheffield/olp-nixos-config/tree/Sean/Upgrade-tool/update-tool/server
I'm using pieces without framework as it's not for a bot, When I call container.stores.register(new MessageStore()) no paths get populated and it never loads a piece, when it should be loading 1
Typescript version: 5.5.4
Pieces version: 4.3.1
Node: 20.16.0
Any ideas?
GitHub
olp-nixos-config/update-tool/server at Sean/Upgrade-tool · UTCSheff...
School's Nixos config. Contribute to UTCSheffield/olp-nixos-config development by creating an account on GitHub.
Solution:Jump to solution
You're missing
container.stores.registerPath()
to set up the path, followed by await container.stores.load();
to load the pieces.6 Replies
Solution
You're missing
container.stores.registerPath()
to set up the path, followed by await container.stores.load();
to load the pieces.Oh, I didn't have to do that the last time I used pieces, It might have been framework doing it for me though
Framework does many things for you, yes
Another quick question, Im getting this error when I try and load a piece, I don't depend on discord.js anywhere though, so I'm confused on where it's coming from (Also that path is wrong but it seems to find it ok
@sapphire/discord.js-utilities
relies on discord.js
, anyways, that's unrelated to this thread.maybe check out how I set it up here: https://github.com/favware/discord-application-emojis-manager which also uses pieces w/o framework
FWIW I dont use registerPath but then I also exclusively use virtual pieces