10 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by staff^
TypeError: Cannot convert undefined or null to object
at Function.entries (<anonymous>)
at formatCraftingCost (C:\Users\finnd\OneDrive\Desktop\economy\commands\shop.js:174:19)
at showPickaxes (C:\Users\finnd\OneDrive\Desktop\economy\commands\shop.js:97:87)
at InteractionCollector.<anonymous> (C:\Users\finnd\OneDrive\Desktop\economy\commands\shop.js:57:31)
at InteractionCollector.emit (node:events:531:35)
at InteractionCollector.handleCollect (C:\Users\finnd\OneDrive\Desktop\economy\node_modules\discord.js\src\structures\interfaces\Collector.js:133:14)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
function formatCraftingCost(costs) {
return Object.entries(costs)
.map(([item, amount]) => {
const emoji = emojis[item];
if (!emoji) {
console.warn(
Emoji for ${item} not found.
);
return ${item}: ${amount}
;
}
return ${emoji} ${amount}
;
})
.join(' ');
}Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
i didnt know if anyone could help coding wise i dont believe it is no sorry if that isnt allowed?
look at #general rq
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
my bad
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
ohh okay thank you my apologies
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View