mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 14:11:50 +00:00
Merge pull request #251 from DarkView/fix_vcMoveOnMute
Check if VC actually changed
This commit is contained in:
commit
27e8494087
2 changed files with 2 additions and 0 deletions
|
@ -30,6 +30,7 @@ export const LogsVoiceStateUpdateEvt = logsEvt({
|
||||||
channel: newChannel,
|
channel: newChannel,
|
||||||
});
|
});
|
||||||
} else if (oldChannel && newChannel) {
|
} else if (oldChannel && newChannel) {
|
||||||
|
if (oldChannel.id === newChannel.id) return;
|
||||||
logVoiceChannelMove(meta.pluginData, {
|
logVoiceChannelMove(meta.pluginData, {
|
||||||
member,
|
member,
|
||||||
oldChannel,
|
oldChannel,
|
||||||
|
|
|
@ -9,6 +9,7 @@ export const SpamVoiceStateUpdateEvt = spamEvt({
|
||||||
if (!member) return;
|
if (!member) return;
|
||||||
const channel = meta.args.newState.channel;
|
const channel = meta.args.newState.channel;
|
||||||
if (!channel) return;
|
if (!channel) return;
|
||||||
|
if (channel.id === meta.args.oldState?.id) return;
|
||||||
|
|
||||||
const config = await meta.pluginData.config.getMatchingConfig({ member, channelId: channel.id });
|
const config = await meta.pluginData.config.getMatchingConfig({ member, channelId: channel.id });
|
||||||
const maxVoiceMoves = config.max_voice_moves;
|
const maxVoiceMoves = config.max_voice_moves;
|
||||||
|
|
Loading…
Add table
Reference in a new issue