diff options
| author | 2019-07-16 15:02:43 -0700 | |
|---|---|---|
| committer | 2019-07-16 15:02:43 -0700 | |
| commit | 3232fd566d5b35f10ffff0d47129f9c052df1303 (patch) | |
| tree | 5c7eec255a7973afaba5b033e9feb7f3c4d6ad70 /bot/utils/moderation.py | |
| parent | Merge remote-tracking branch 'remotes/origin/master' into django (diff) | |
| parent | Merge pull request #376 from python-discord/django-watchchannels (diff) | |
Merge remote-tracking branch 'origin/django' into django-merge
Merge in RMQ removal, Snekbox changes, and watch channel rework, among
other minor things.
Diffstat (limited to 'bot/utils/moderation.py')
| -rw-r--r-- | bot/utils/moderation.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/bot/utils/moderation.py b/bot/utils/moderation.py index fcdf3c4d5..c1eb98dd6 100644 --- a/bot/utils/moderation.py +++ b/bot/utils/moderation.py @@ -14,8 +14,13 @@ HEADERS = {"X-API-KEY": Keys.site_api} async def post_infraction( - ctx: Context, user: Union[Member, Object, User], - type: str, reason: str, expires_at: datetime = None, hidden: bool = False + ctx: Context, + user: Union[Member, Object, User], + type: str, + reason: str, + expires_at: datetime = None, + hidden: bool = False, + active: bool = True, ): payload = { @@ -23,7 +28,8 @@ async def post_infraction( "hidden": hidden, "reason": reason, "type": type, - "user": user.id + "user": user.id, + "active": active } if expires_at: payload['expires_at'] = expires_at.isoformat() |