Androz2091 / Androz2091/discord-giveaways

Sharding and Quickmongo does not work together

Offen
#445 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug
Vorherrschende Sprache
JavaScript
Sterne
333
Forks
125
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

My code is:
```js
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...

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.