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
Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator.
Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator.
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:
interaction.reply returns a promise. It just be that way. Either await it, or if it's last in the command then return it.
Jump to solution
2 Replies
Solution
Favna
Favna2y ago
interaction.reply returns a promise. It just be that way. Either await it, or if it's last in the command then return it.
Lioness100
Lioness1002y ago
Click the link in vscode that will lead you to the rule on the eslint website, it provides good info
Want results from more Discord servers?
Add your server