Add membership check to dot commands
This commit is contained in:
parent
93251348a3
commit
4cf3efa584
6
main.js
6
main.js
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user