Skip to content

Commit

Permalink
Fix arearestrictions for allowed users (#379)
Browse files Browse the repository at this point in the history
* chore: Update external deps

* fix: Override arearestrictions for yolo users
  • Loading branch information
clburlison authored May 27, 2021
1 parent 355622a commit 3970f7f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 55 deletions.
68 changes: 14 additions & 54 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"discord.js": "^12.3.1",
"eslint": "^7.9.0",
"express": "^4.17.1",
"express-mysql-session": "^2.1.4",
"express-mysql-session": "^2.1.6",
"express-rate-limit": "^5.1.3",
"express-session": "^1.17.1",
"extend": "^3.0.2",
Expand Down
1 change: 1 addition & 0 deletions src/services/discord.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class DiscordClient {
const [guilds, guildsFull] = await this.getGuilds();
if (config.discord.allowedUsers.includes(user.id)) {
Object.keys(perms).forEach((key) => perms[key] = true);
perms.areaRestrictions = [];
console.log(`User ${user.username}#${user.discriminator} (${user.id}) in allowed users list, skipping guild and role check.`);
return perms;
}
Expand Down

0 comments on commit 3970f7f

Please sign in to comment.