Skip to content

Commit

Permalink
Merge pull request #28 from uaf-cs/feat/utility-perms
Browse files Browse the repository at this point in the history
feat: utility perms
  • Loading branch information
katlyn authored Aug 26, 2023
2 parents 27c9c25 + 3dcd845 commit fa18039
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 18 deletions.
1 change: 1 addition & 0 deletions docker-compose.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ services:
CS_ALUMNUS:
CS_TEACHER:
CS_TEACHING_ASSISTANT:
CS_ADMIN_UTILITY:

# Discord application information
DISCORD_CLIENT_ID:
Expand Down
36 changes: 18 additions & 18 deletions package-lock.json

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

7 changes: 7 additions & 0 deletions src/commands/classes/management.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ const generateOverwrites = (role: string): Overwrite[] => {
type: Constants.PermissionOverwriteTypes.ROLE,
allow: 1024,
deny: 0
},
{
// Admin utility role, allow read messages, deny none
id: process.env.CS_ADMIN_UTILITY,
type: Constants.PermissionOverwriteTypes.ROLE,
allow: 1024,
deny: 0
}
]
}
Expand Down
1 change: 1 addition & 0 deletions src/custom.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ declare global {
CS_ALUMNUS: string
CS_TEACHER: string
CS_TEACHING_ASSISTANT: string
CS_ADMIN_UTILITY: string
DISCORD_CLIENT_ID: string
DISCORD_CLIENT_SECRET: string
DISCORD_TOKEN: string
Expand Down

0 comments on commit fa18039

Please sign in to comment.