3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-24 10:05:03 +00:00

More initialization order fixes (vol 2)

This commit is contained in:
Dragory 2021-05-23 17:13:11 +03:00
parent 9b6ee0b454
commit 8011885dc0
27 changed files with 97 additions and 44 deletions

View file

@ -54,7 +54,7 @@ export const ReactionRolesPlugin = zeppelinGuildPlugin<ReactionRolesPluginType>(
AddReactionRoleEvt,
],
afterLoad(pluginData) {
beforeLoad(pluginData) {
const { state, guild } = pluginData;
state.reactionRoles = GuildReactionRoles.getGuildInstance(guild.id);
@ -63,7 +63,9 @@ export const ReactionRolesPlugin = zeppelinGuildPlugin<ReactionRolesPluginType>(
state.roleChangeQueue = new Queue();
state.pendingRoleChanges = new Map();
state.pendingRefreshes = new Set();
},
afterLoad(pluginData) {
let autoRefreshInterval = pluginData.config.get().auto_refresh_interval;
if (autoRefreshInterval != null) {
autoRefreshInterval = Math.max(MIN_AUTO_REFRESH, autoRefreshInterval);