Closed FC5570 closed 3 years ago
@FC5570 which DB are you using?
@FC5570 hello comrade Could you show us your code, along with which DB you're using, as Nico said?
I use quickmongo (https://npmjs.com/package/quickmongo), something like quick.db but stores data to mongodb.
Also, after taking a look at the code of this package, it looks like this error occured because I don't have a getAllGiveaways() function.
https://github.com/Androz2091/discord-giveaways/blob/develop/examples/custom-databases/quickmongo.js Add it like that and take note to add the line 65 and 70 part
Alright, I'll try that, thanks
I still get an error, this is a weird one, it says it cant read property 'fetch' of undefined in getAllGiveaways()
function,
this is my code: https://sourceb.in/B7oXNRt1Eq,
the error is from the line where I return the fetched giveaways in getAllGiveaways()
function, line 3 in the above code
@FC5570 could you show us your database initialization?
@FC5570 could you show us your database initialization?
const { Database } = require("quickmongo"); this.db = new Database('uri'); this.db.on('ready', async () => { if (!Array.isArray(await this.db.get('giveaways'))) await this.db.set('giveaways', []); this.giveawaysManager._init(); });
Could you try moving the class extends and db creation (assign to const) outside of your client extending, so like this https://github.com/Androz2091/discord-giveaways/issues/190
Yea that worked, thanks
Hello, im getting an error from this package, (/src/Manager.js:448), heres the error:
If you need any more info, please mention me. Thanks.