Am I doing this wrong? I feel like I'm doing this wrong.
Hey there,
In my ping command I'm doing
void interaction.reply(await resolveKey(interaction, "ping:success", { ping }))
because I'm using eslint and it is screaming when not using void
. Is this a good way of handling the eslint error or is there a better one. resolveKey
is from @sapphire/plugin-i18next
and the eslint config is from @sapphire/eslint-config
.Solution:Jump to solution
interaction.reply returns a promise. It just be that way. Either await it, or if it's last in the command then return it.
2 Replies
Solution
interaction.reply returns a promise. It just be that way. Either await it, or if it's last in the command then return it.
Click the link in vscode that will lead you to the rule on the eslint website, it provides good info