aboutsummaryrefslogtreecommitdiffstats
path: root/bot/utils/moderation.py
diff options
context:
space:
mode:
authorGravatar SebastiaanZ <[email protected]>2019-07-03 16:31:05 +0200
committerGravatar SebastiaanZ <[email protected]>2019-07-03 16:31:05 +0200
commitd8fc80cefa272901e27e54564298596ab7ce4514 (patch)
tree5e2bded310eb605796c0df1b832c3d98987b432e /bot/utils/moderation.py
parentApplying changes requested in the reviews. (diff)
Applied the following changes requested by reviews:
- Bot responses are now plain messages instead of embeds; - The message history in the WatchChannel cog is now stored using a new dataclass, MessageHistory; - Removed the truncation option from the modified name field in logging; - bigbrother now provides user feedback when watching fails due to failing cache update; - Changed the lay-out of the mod_log alert and set ping_everyone to True; - Changed the function signature of `post_infraction` utility function to the one-parameter-per-line style; - Moved the declaration of File within bot/utils/messages.py to before the if/else to make things DRY.
Diffstat (limited to '')
-rw-r--r--bot/utils/moderation.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/bot/utils/moderation.py b/bot/utils/moderation.py
index e81186253..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, active: bool = True
+ ctx: Context,
+ user: Union[Member, Object, User],
+ type: str,
+ reason: str,
+ expires_at: datetime = None,
+ hidden: bool = False,
+ active: bool = True,
):
payload = {