From e798e3d6e2bf1a4edcadb8ab68a702b099234adf Mon Sep 17 00:00:00 2001 From: Jiiks Date: Sat, 25 Aug 2018 16:59:24 +0300 Subject: [PATCH] Voice Disconnect refactor to use new builtin base --- client/src/builtin/VoiceDisconnect.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/client/src/builtin/VoiceDisconnect.js b/client/src/builtin/VoiceDisconnect.js index 24a279d3..9457f35a 100644 --- a/client/src/builtin/VoiceDisconnect.js +++ b/client/src/builtin/VoiceDisconnect.js @@ -13,21 +13,23 @@ import { Reflection } from 'modules'; export default new class VoiceDisconnect extends BuiltinModule { - get settingPath() { - return ['core', 'default', 'voice-disconnect']; - } + /* Getters */ + get moduleName() { return 'VoiceDisconnect' } + + get settingPath() { return ['core', 'default', 'voice-disconnect'] } async enabled(e) { window.addEventListener('beforeunload', this.listener); } - listener() { - const { VoiceChannelActions } = Reflection.modules; - VoiceChannelActions.selectVoiceChannel(null, null); - } - disabled(e) { window.removeEventListener('beforeunload', this.listener); } + /* Methods */ + listener() { + const { VoiceChannelActions } = Reflection.modules; + VoiceChannelActions.selectVoiceChannel(null, null); + } + }