im trying to do a simple command help but Command dont have a propertie with permissions of handler
.
21 Replies
code and error
read title, "Command dont have a propertie with permissions of handler"
i dont have code because i dont know how i can do
Then I can't help you
now i have this
but i have this error
change
addFields
to addField
or pass an array into addFields
They removed
addField
, but you can always extend the EmbedBuilder class (I can send the code later when on PC if needed)what is the solution ?
addField now dont exist
discord.js remove that
then use
addFields
properly
ohh
well, thats not the error
i have same error
well then there is no way to tell from the code provided but somewhere the code you're writing is invalid and doesn't match the required input
required input of what ?
this is all code
required input of a function you're calling
also you should really remove that
ts-ignore
. Sapphire is perfectly TS compatible. If you get a TS error then you need to fix your own code.
Regarding the above, the problem is that the type is MessageCommand.RunContext
, not MessageCommand.Context
as for the issue of the array validator, the problem is that you're assuming that comand.aliases
always has values, which it doesnt if you do not give the command aliases. I rewrote the code in my own test bot (fixing various other bugs as well as English grammar and spelling mistakes, and stylistic improvements along the way) and then I stumbled on that issueThis way the command works just fine. You should also note that you do not need
PyraCommandExtends
at all, you do not need a custom command class just to add usage
and examples
properties. You can just chuck them in detailedDescription
as you see here, and add that bit of lines 5-9 somewhere in your setup / module augmentation files.the code before work with that ts-ignore
Doesn't mean anything, it's still wrong
well that right
english grammar because its for a school project and im not know english
Even more reason to show off your skill and write proper English. The internet is vast beyond believe, there is hardly a reason anymore to not use some proof reading service. And with chatgpt these days that's even easier.
🫡
thank u