mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
More initialization order fixes (vol 2)
This commit is contained in:
parent
22316eb714
commit
72637fe1b3
27 changed files with 97 additions and 44 deletions
|
@ -146,7 +146,7 @@ export const CountersPlugin = zeppelinGuildPlugin<CountersPluginType>()({
|
|||
ResetAllCounterValuesCmd,
|
||||
],
|
||||
|
||||
async afterLoad(pluginData) {
|
||||
async beforeLoad(pluginData) {
|
||||
pluginData.state.counters = new GuildCounters(pluginData.guild.id);
|
||||
pluginData.state.events = new EventEmitter();
|
||||
pluginData.state.counterTriggersByCounterId = new Map();
|
||||
|
@ -190,6 +190,10 @@ export const CountersPlugin = zeppelinGuildPlugin<CountersPluginType>()({
|
|||
|
||||
// Mark old/unused triggers to be deleted later
|
||||
await pluginData.state.counters.markUnusedTriggersToBeDeleted(activeTriggerIds);
|
||||
},
|
||||
|
||||
async afterLoad(pluginData) {
|
||||
const config = pluginData.config.get();
|
||||
|
||||
// Start decay timers
|
||||
pluginData.state.decayTimers = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue