-
-
Notifications
You must be signed in to change notification settings - Fork 127
Open
Labels
bugSomething isn't workingSomething isn't working
Description
My code is:
const { GiveawaysManager } = require('discord-giveaways');
const CustomGiveawayManager = class extends GiveawaysManager {
async getAllGiveaways() {
console.log("getAllGiveaways".bgGreen)
return await client.giveawayDB.all(true);
}
async saveGiveaway(messageId, giveawayData) {
await client.giveawayDB.set(messageId, giveawayData);
return true;
}
async editGiveaway(messageId, giveawayData) {
await client.giveawayDB.set(messageId, giveawayData);
return true;
}
async deleteGiveaway(messageId) {
await client.giveawayDB.delete(messageId);
return true;
}
async refreshStorage() {
console.log("refreshStorage".bgGreen)
return client.cluster.broadcastEval(`this.giveawaysManager.getAllGiveaways()`);
}
};
const manager = new CustomGiveawayManager(client, {
default: {
botsCanWin: false,
embedColor: ee.color,
embedColorEnd: ee.wrongcolor,
reaction: '🎉'
}
});
client.giveawaysManager = manager;
If i restart the bot after starting a giveaway getAllGiveaways
is logged but never refreshStorage
- After the restart, it's not ending the giveaway, however, if the bot stays online after starting the giveaway it will end it...
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working