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:
I found the error; Basically when I called the "super" function inside the constructor, it overwrote all the configuration provided by the decorator
Jump to solution
7 Replies
clownn
clownn2y ago
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.
clownn
clownn2y ago
apparently the error appears when i run this function
clownn
clownn2y ago
i don't have any idea of what is s.string.lengthGreaterThanOrEqual ping me if anyone found a answer
Favna
Favna2y ago
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
clownn
clownn2y ago
I found the error; Basically when I called the "super" function inside the constructor, it overwrote all the configuration provided by the decorator
Favna
Favna2y ago
oh yeah I overlooked that but that is correct you have to use either one of the two
clownn
clownn2y ago
yeah
Want results from more Discord servers?
Add your server