I don't even know how to name this

Code and error
3 Replies
Favna
Favna2y ago
Name has to match the regex provided I.e. all lower case
kyra
kyra2y ago
You can either define no name at all so it's defined by the filename (it'll be defined as _parent, you have to remove the underscore). Or if you use ESM, you can read import.meta.url's name parameter and transform it (new URL(import.meta.url).searchParams.get('name')). The loader defines three parameters, the loading time d, the name name, and the extension: https://github.com/sapphiredev/pieces/blob/main/src/lib/strategies/LoaderStrategy.ts#L55-L57 In your case, name will be _parent. Furthermore, lowercasing is not necessary because Command already lowercases it. https://github.com/sapphiredev/framework/blob/main/src/lib/structures/Command.ts#L89.
simxnet
simxnetOP2y ago
indeed ty
Want results from more Discord servers?
Add your server