Skip to content

Commit

Permalink
Fixes #2892
Browse files Browse the repository at this point in the history
  • Loading branch information
zoemartin01 committed Nov 19, 2020
1 parent 802e740 commit 03899d2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
This project mostly adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html);
however, insignificant breaking changes do not guarantee a major version bump, see the reasoning [here](https://github.com/kyb3r/modmail/issues/319). If you're a plugin developer, note the "BREAKING" section.

# v3.7.9

### Fixed

- `perms add/remove` should now work again

# v3.7.8

### Added
Expand Down
4 changes: 3 additions & 1 deletion bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -988,9 +988,11 @@ async def update_perms(
) -> None:
value = str(value)
if isinstance(name, PermissionLevel):
level = True
permissions = self.config["level_permissions"]
name = name.name
else:
level = False
permissions = self.config["command_permissions"]
if name not in permissions:
if add:
Expand All @@ -1003,7 +1005,7 @@ async def update_perms(
if value in permissions[name]:
permissions[name].remove(value)

if isinstance(name, PermissionLevel):
if level:
self.config["level_permissions"] = permissions
else:
self.config["command_permissions"] = permissions
Expand Down

0 comments on commit 03899d2

Please sign in to comment.