diff options
| author | 2019-04-23 17:01:12 +0200 | |
|---|---|---|
| committer | 2019-06-27 22:03:57 +0200 | |
| commit | 5653c52c88508f03469960cf1abab45b2a5341d5 (patch) | |
| tree | f85a3c46541ce19e6d9d2beccfb538a339d70d58 | |
| parent | Changing the send_attachments utility to add WebHook support (diff) | |
Adding support to the 'active' parameter when posting an infraction
| -rw-r--r-- | bot/utils/moderation.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bot/utils/moderation.py b/bot/utils/moderation.py index fcdf3c4d5..e81186253 100644 --- a/bot/utils/moderation.py +++ b/bot/utils/moderation.py @@ -14,8 +14,8 @@ 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 +23,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() |