Maid
DIAdiscord.js - Imagine an app
•Created by Maid on 6/25/2024 in #djs-questions
help
ohh okay thank you my apologies
12 replies
DIAdiscord.js - Imagine an app
•Created by Maid on 6/25/2024 in #djs-questions
help
i didnt know if anyone could help coding wise i dont believe it is no sorry if that isnt allowed?
12 replies
DIAdiscord.js - Imagine an app
•Created by Maid on 6/25/2024 in #djs-questions
help
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(' ');
}12 replies
DIAdiscord.js - Imagine an app
•Created by Maid on 6/25/2024 in #djs-questions
help
^
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)
12 replies