Merge pull request #12 from Vylpes/bug/commands-run-anyone
Fixed bug which didn't let commands to run by anyone if no user restriction was set
This commit is contained in:
commit
e50630e4f4
1 changed files with 6 additions and 4 deletions
|
@ -50,10 +50,12 @@ class util {
|
||||||
// Get the ids of the users that are only permitted to run this command
|
// Get the ids of the users that are only permitted to run this command
|
||||||
let users = command.users;
|
let users = command.users;
|
||||||
|
|
||||||
// If the user isn't in the list, don't run the command
|
// If the command has any limits, limit the command, otherwise default to anyone
|
||||||
if (!users.includes(message.member.id)) {
|
if (users.length > 0) {
|
||||||
message.reply(`You do not have permission to run this command`);
|
if (!users.includes(message.member.id)) {
|
||||||
return;
|
message.reply(`You do not have permission to run this command`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run the command and pass the command context with it
|
// Run the command and pass the command context with it
|
||||||
|
|
Reference in a new issue