"There are no more arguments." using args.pick('integer')
In this particular case I am trying to check if there is any argument after the command (while my method does work) I get an error saying "there are no more arguments" on
value
I am not using args.finished
of sapphire.js because that doesn't seem to check the numbers, only characters.
Could proceed by simply catching the error and returning null
but that seems unprofessional, any ideas?2 Replies
adding
args.finished
wont trigger the second check if people attend to put a value that's higher or lower than 1 or 150, and renders the command unusable if people attempt to change the volume of the player.
tl;dr: only the args.finished
check will get triggeredSounds like you want to use this pattern instead: https://www.sapphirejs.dev/docs/Guide/arguments/using-arguments#optional-arguments
Which would result your code to be...
Sapphire Framework
Using arguments in your commands | Sapphire
This section is only for the message command and is not relevant for the other command types. If you are looking for how