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

Merge pull request #251 from DarkView/fix_vcMoveOnMute

Check if VC actually changed
This commit is contained in:
Miikka 2021-08-20 20:24:22 +03:00 committed by GitHub
commit 27e8494087
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View file

@ -30,6 +30,7 @@ export const LogsVoiceStateUpdateEvt = logsEvt({
channel: newChannel,
});
} else if (oldChannel && newChannel) {
if (oldChannel.id === newChannel.id) return;
logVoiceChannelMove(meta.pluginData, {
member,
oldChannel,

View file

@ -9,6 +9,7 @@ export const SpamVoiceStateUpdateEvt = spamEvt({
if (!member) return;
const channel = meta.args.newState.channel;
if (!channel) return;
if (channel.id === meta.args.oldState?.id) return;
const config = await meta.pluginData.config.getMatchingConfig({ member, channelId: channel.id });
const maxVoiceMoves = config.max_voice_moves;