Proper button validation, bugfix for voice move spam

This commit is contained in:
Dark 2021-07-01 00:30:48 +02:00
parent 1ad70ffe1a
commit bb9b8cfe06
No known key found for this signature in database
GPG key ID: 384C4B4F5B1E25A8
2 changed files with 12 additions and 1 deletions

View file

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