3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Hotfix 13

This commit is contained in:
Dragory 2021-08-18 23:22:34 +03:00
parent 30f184897f
commit 51d2f61f25
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

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);
},
});