i18n question
So this works
but when I use
applyLocalizedBuilder(builder, 'commands:ping')
I get
13 Replies
Is this possibly cause the layout is different when I use it like this?
Also another question how do I put resolveKey into the same statement as content: as if I do it I have to do as string but nof it I do it's own line
The latter implies there is a file called
commands.json
which has keys pingName
and pingDescription
. You don't have that so it resolves to pingName
which is invalid so through @sapphire/shapeshift validations that @discordjs/builders uses an error is thrown.
You should also have an understanding of the i18next API when using this plug-in: https://www.i18next.com/overview/getting-started
I really don't understand this question. Please provide examples. Also:When asking for help, make sure to provide as much detail as possible. What have you tried so far? Do you have stacktraces that you can show us? What are you trying to achieve? Try to answer these questions and others, so we do not have to ask for them afterwards.
❯ For a good guide on how to ask questions, see the instructions that StackOverflow gives. You should try to always follow these guidelines. ❯ For an excellent video that shows how not to ask technical questions is this, watch this YouTube video by LiveOverflow. ❯ Asking technical questions (Clarkson) ❯ How to ask questions the smart way (Raymond)
Thank you that clears it up
this works
So does this
But this does not
I am not sure what the difference is
Why do I have to explicitly cast it, or is it inferred when I use const? I am not sure this is a framework question but it's the first time I stumble upon it
What's the error it gives
resolveKey
's return type is string | null
and content
has to be string | undefined
so yeah that error makes sense. Instead of casting it, you should write it as
though you should actually check if the resolved key gives a string value before even trying to send it.how come in the example below it works
like here
What's the difference to that and then just putting it directly in?
Idk tbh