mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 20:35: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
|
@ -11,13 +11,17 @@ export const GuildInfoSaverPlugin = zeppelinGuildPlugin<GuildInfoSaverPluginType
|
|||
|
||||
configSchema: t.type({}),
|
||||
|
||||
beforeLoad(pluginData) {
|
||||
pluginData.state.allowedGuilds = new AllowedGuilds();
|
||||
},
|
||||
|
||||
afterLoad(pluginData) {
|
||||
const { state, guild } = pluginData;
|
||||
|
||||
state.allowedGuilds = new AllowedGuilds();
|
||||
|
||||
updateGuildInfo(pluginData);
|
||||
state.updateInterval = setInterval(() => updateGuildInfo(pluginData), 60 * MINUTES);
|
||||
pluginData.state.updateInterval = setInterval(() => updateGuildInfo(pluginData), 60 * MINUTES);
|
||||
},
|
||||
|
||||
beforeUnload(pluginData) {
|
||||
clearInterval(pluginData.state.updateInterval);
|
||||
},
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue