Skip to content

Commit

Permalink
feat: Add the Moderate Members Permission (sandrabot#7)
Browse files Browse the repository at this point in the history
* Moderate Members Added

Added the MODERATE_MEMBERS translation key as "moderate_members"

* Added Moderate Members Translation

Moderate Members to be called "Timeout Members" for users as that is how the permission is displayed in the client: Stable 116311 (458624d)
  • Loading branch information
dart0x01 authored Feb 25, 2022
1 parent a889de5 commit 8ef786f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/main/kotlin/com/sandrabot/sandra/utils/permissions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,6 @@ fun findTranslationKey(permission: Permission) = when (permission) {
Permission.NICKNAME_MANAGE -> "manage_nicknames"
Permission.MANAGE_ROLES -> "manage_roles"
Permission.MANAGE_PERMISSIONS -> "manage_permissions"
Permission.MODERATE_MEMBERS -> "moderate_members"
else -> throw MissingTranslationException("Missing translation for permission $permission")
}
3 changes: 2 additions & 1 deletion src/main/resources/translations/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"change_nickname": "Change Nickname",
"manage_nicknames": "Manage Nicknames",
"manage_roles": "Manage Roles",
"manage_permissions": "Manage Permissions"
"manage_permissions": "Manage Permissions",
"moderate_members": "Timeout Members",
},
"categories": {
"custom": "Custom",
Expand Down

0 comments on commit 8ef786f

Please sign in to comment.