Add membership check to dot commands

This commit is contained in:
Skylar Grant 2025-03-31 20:24:17 -04:00
parent 93251348a3
commit 4cf3efa584

View File

@ -143,7 +143,11 @@ client.on('messageCreate', message => {
if (commandData.isValid && commandData.isCommand) {
try {
client.dotCommands.get(commandData.command).execute(message, commandData);
if (fn.checkMembership(client, message.user.id)) {
client.dotCommands.get(commandData.command).execute(message, commandData);
} else {
message.reply(fn.embeds.noMembership());
}
}
catch (error) {
console.error(error);