3 Replies
Name has to match the regex provided
I.e. all lower case
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.indeed
ty