aboutsummaryrefslogtreecommitdiffstats
path: root/bot/utils/moderation.py
diff options
context:
space:
mode:
authorGravatar Leon Sandøy <[email protected]>2019-07-16 22:05:44 +0200
committerGravatar GitHub <[email protected]>2019-07-16 22:05:44 +0200
commit522c475d514400118c9449762b7a42e81e7e4eb3 (patch)
tree8fb43b52f6a7348250ebc9c0168aa0961cff9f81 /bot/utils/moderation.py
parentmoving over the communities to whitelist from master. (diff)
parentApply suggestions from code review (diff)
Merge pull request #376 from python-discord/django-watchchannels
BigBrother/TalentPool/WatchChannel submodule
Diffstat (limited to 'bot/utils/moderation.py')
-rw-r--r--bot/utils/moderation.py12
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()