Add membership check to dot commands
This commit is contained in:
parent
93251348a3
commit
4cf3efa584
4
main.js
4
main.js
@ -143,7 +143,11 @@ client.on('messageCreate', message => {
|
|||||||
|
|
||||||
if (commandData.isValid && commandData.isCommand) {
|
if (commandData.isValid && commandData.isCommand) {
|
||||||
try {
|
try {
|
||||||
|
if (fn.checkMembership(client, message.user.id)) {
|
||||||
client.dotCommands.get(commandData.command).execute(message, commandData);
|
client.dotCommands.get(commandData.command).execute(message, commandData);
|
||||||
|
} else {
|
||||||
|
message.reply(fn.embeds.noMembership());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user