String Length error while trying to register a command
command registry for command "setup" at path "/home/userland/dev/shnhelper/dist/commands/Configuration/setup.js" ExpectedConstraintError > s.string.lengthGreaterThanOrEqual
2022-12-31 12:34:33 - ERROR - Invalid string length
2022-12-31 12:34:33 - ERROR -
2022-12-31 12:34:33 - ERROR - Expected: expected.length >= 1
2022-12-31 12:34:33 - ERROR -
2022-12-31 12:34:33 - ERROR - Received:
2022-12-31 12:34:33 - ERROR - | ''
2022-12-31 12:34:33 - ERROR -
Solution:Jump to solution
I found the error; Basically when I called the "super" function inside the constructor, it overwrote all the configuration provided by the decorator
7 Replies
Pastebin
import { ApplyOptions } from '@sapphire/decorators';import { Comman...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
apparently the error appears when i run this function
i don't have any idea of what is s.string.lengthGreaterThanOrEqual
ping me if anyone found a answer
s.string.lengthGreaterThanOrEqual
means the string has to have a length greater than or equal to something, in this case 1. And the actual value is | ''
.
Can't tell from your code but the error should be able to print a full stracktrace as well.Solution
I found the error; Basically when I called the "super" function inside the constructor, it overwrote all the configuration provided by the decorator
oh yeah I overlooked that but that is correct
you have to use either one of the two
yeah