Voice Disconnect refactor to use new builtin base
This commit is contained in:
parent
937ab55456
commit
e798e3d6e2
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue