aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/exts/filters/filter_lists.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bot/exts/filters/filter_lists.py b/bot/exts/filters/filter_lists.py
index edc2d09f3..c429b0eb9 100644
--- a/bot/exts/filters/filter_lists.py
+++ b/bot/exts/filters/filter_lists.py
@@ -15,6 +15,7 @@ from bot.constants import Channels, Colours
from bot.converters import ValidDiscordServerInvite, ValidFilterListType
from bot.log import get_logger
from bot.pagination import LinePaginator
+from bot.utils.channel import is_mod_channel
log = get_logger(__name__)
WEEKLY_REPORT_ISO_DAY = 3 # 1=Monday, 7=Sunday
@@ -315,6 +316,9 @@ class FilterLists(Cog):
seven_days_ago = arrow.utcnow().shift(days=-7)
if not channel:
channel = self.bot.get_channel(Channels.mod_meta)
+ elif not is_mod_channel(channel):
+ # Silently fail if output is going to be a non-mod channel.
+ return
added_autobans = defaultdict(list)
# Extract all autoban filters added in the past 7 days from each filter type