diff options
author | 2021-10-25 21:49:34 +0200 | |
---|---|---|
committer | 2021-10-25 21:49:34 +0200 | |
commit | 874978e575ad6ef5c615f4736e47fd0f6b360af8 (patch) | |
tree | 759e4a00436c0dafac8e46d793db7e6b65a92197 | |
parent | Filter list: move warning to #mod-meta (diff) |
Fltering: clean up autoban code
-rw-r--r-- | bot/exts/filters/filter_lists.py | 2 | ||||
-rw-r--r-- | bot/exts/filters/filtering.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/bot/exts/filters/filter_lists.py b/bot/exts/filters/filter_lists.py index 4af76af76..ee5bd89f3 100644 --- a/bot/exts/filters/filter_lists.py +++ b/bot/exts/filters/filter_lists.py @@ -104,7 +104,7 @@ class FilterLists(Cog): # If it is an autoban trigger we send a warning in #mod-meta if comment and "[autoban]" in comment: await self.bot.get_channel(Channels.mod_meta).send( - f":warning: heads-up! The new filter `{content}` (`{comment}`) will automatically ban users." + f":warning: Heads-up! The new filter `{content}` (`{comment}`) will automatically ban users." ) # Insert the item into the cache diff --git a/bot/exts/filters/filtering.py b/bot/exts/filters/filtering.py index bda4e7ac2..5e91e7e3d 100644 --- a/bot/exts/filters/filtering.py +++ b/bot/exts/filters/filtering.py @@ -1,6 +1,6 @@ import asyncio import re -from datetime import datetime, timedelta +from datetime import timedelta from typing import Any, Dict, List, Mapping, NamedTuple, Optional, Tuple, Union import arrow @@ -375,8 +375,8 @@ class Filtering(Cog): await context.invoke( self.bot.get_command("tempban"), msg.author, - datetime.now() + AUTO_BAN_DURATION, - reason=AUTO_BAN_REASON.strip() + arrow.utcnow() + AUTO_BAN_DURATION, + reason=AUTO_BAN_REASON ) break # We don't want multiple filters to trigger |