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

fix: fix errors when unloading certain plugins after beforeLoad but before afterLoad

This commit is contained in:
Dragory 2021-10-31 16:48:32 +02:00
parent 922c4ff871
commit 4fd5013a28
5 changed files with 22 additions and 10 deletions

View file

@ -120,7 +120,7 @@ export const MutesPlugin = zeppelinGuildPlugin<MutesPluginType>()({
},
beforeUnload(pluginData) {
pluginData.state.unregisterGuildEventListener();
pluginData.state.unregisterGuildEventListener?.();
pluginData.state.events.removeAllListeners();
},
});