feat: add kick, mute, and unmute commands

This commit is contained in:
Ahmad 2025-04-16 22:10:47 -04:00
parent 49d274f2be
commit 20af09b279
No known key found for this signature in database
GPG key ID: 8FD8A93530D182BF
8 changed files with 395 additions and 7 deletions

View file

@ -6,7 +6,7 @@ import {
} from 'discord.js';
import { updateMember, setMembers } from '@/db/db.js';
import { generateMemberBanner } from '@/util/helpers.js';
import { executeUnmute, generateMemberBanner } from '@/util/helpers.js';
import { loadConfig } from '@/util/configLoader.js';
import { Event } from '@/types/EventTypes.js';
import logAction from '@/util/logging/logAction.js';
@ -144,6 +144,21 @@ export const memberUpdate: Event<typeof Events.GuildMemberUpdate> = {
});
}
}
if (
oldMember.communicationDisabledUntil !==
newMember.communicationDisabledUntil &&
newMember.communicationDisabledUntil === null
) {
executeUnmute(
newMember.client,
guild.id,
newMember.user.id,
undefined,
guild.members.me!,
true,
);
}
} catch (error) {
console.error('Error handling member update:', error);
}