TypeError - currency.set is not a function
getting this error when using the DJS currency system guide, if anyone can help, it would be greatly appreciated <3
the part of the code that is throwing the error:
2 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
the error stack:
this has me stumped. it was working perfectly about 15 minutes ago and i quite literally changed a bit of a message it was supposed to reply with, which somehow broke two whole commands- ;-;
my node and npm version are the latest, as well
gotcha
[email protected]
Node.js v18.2.0
i defined it in a separate './currency.js' file, using
const currency = new Collection();
and exported it from there, then required it in necessary files
export: module.exports = { addBalance, getBalance, currency };
imports: const currency = require('./currency');
will do, thank you for the help ^^