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

Hotfix 13

This commit is contained in:
Dragory 2021-08-18 23:22:34 +03:00
parent aa99c9309c
commit 3aa3c28fd6

View file

@ -6,7 +6,12 @@ export const VoiceStateUpdateEvt = companionChannelsEvt({
listener({ pluginData, args: { oldState, newState } }) {
const oldChannel = oldState.channel;
const newChannel = newState.channel;
const memberId = newState.member ? newState.member.id : oldState.member!.id;
const memberId = newState.member?.id ?? oldState.member?.id;
if (!memberId) {
return;
}
handleCompanionPermissions(pluginData, memberId, newChannel, oldChannel);
},
});