Problem with this.container.stores.get().get();

Code:
Solution:
The error means you're probably not running this code in a piece (listener, command, etc), so this.container doesn't exist. Instead, import container from @sapphire/framework directly.
Jump to solution
9 Replies
Solution
Lioness100
Lioness100•16mo ago
The error means you're probably not running this code in a piece (listener, command, etc), so this.container doesn't exist. Instead, import container from @sapphire/framework directly.
Lioness100
Lioness100•16mo ago
Also, just looking at your code.. what? It looks like you're creating a command handler, but the whole point of sapphire is that it does that for you I recommend you read the guide
Spinel
Spinel•16mo ago
<:_:746069730170896405> Sapphire docs results: General / Welcome
Lioness100
Lioness100•16mo ago
oops
Spinel
Spinel•16mo ago
<:_:746069730170896405> Sapphire guide results: Getting Started / Getting started with Sapphire
-Carlosđź‘‘
-Carlos👑•16mo ago
it's for a error handler not a cmd handler but thanks
Lioness100
Lioness100•16mo ago
You might still want to look into sapphire's arg system to save you manually splitting and parsing the message
-Carlosđź‘‘
-Carlos👑•16mo ago
can you send me the docs for that
Spinel
Spinel•16mo ago
Documentation suggestion for @-Carlos👑: <:_:746069730170896405> Sapphire guide results: Arguments / Using arguments in your commands / String arguments​