feat(bot-discord): mute and unmute command

This commit is contained in:
GramingFoxTeam
2023-08-07 13:15:19 +03:00
parent d11ee5f01f
commit e5cf9f214e
13 changed files with 605 additions and 6 deletions

View File

@@ -0,0 +1,20 @@
import { Events } from 'discord.js';
export default {
name: Events.GuildMemberAdd,
once: false,
async execute(_, config, member) {
const mute = await client.db.collection('mute').findOne({
guild_id: member.guild.id,
user_id: member.id
});
if (mute) {
// Add the roles given.
member.roles.add(mute.support_mute ?
config.mute.supportGiveRoles :
config.mute.giveRoles
);
}
}
};