Closed Azer154 closed 2 years ago
db.on('ready', () => client.giveawaysManager._init()); const { GiveawaysManager } = require('discord-giveaways'); const GiveawayManagerWithOwnDatabase = class extends GiveawaysManager { async getAllGiveaways() { console.log('Done') return await db.all(); } async saveGiveaway(messageId, giveawayData) { await db.set(messageId, giveawayData); console.log("SAVED") return true; } async editGiveaway(messageId, giveawayData) { await db.set(messageId, giveawayData); return true; } // This function is called when a giveaway needs to be deleted from the database. async deleteGiveaway(messageId) { await db.delete(messageId); return true; } }; const manager = new GiveawayManagerWithOwnDatabase(client, { default: { botsCanWin: false, embedColor: '#FF0000', embedColorEnd: '#000000', reaction: '🎉' } }, false); client.giveawaysManager = manager;
When I restart by bot, it doesn't end the giveaway I use quickmongo v5.1.2 discord-giveaways v5.1.1
When I restart by bot, it doesn't end the giveaway I use quickmongo v5.1.2 discord-giveaways v5.1.1