aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/__main__.py8
-rw-r--r--bot/cogs/moderation/modlog.py4
-rw-r--r--bot/cogs/stats.py3
-rw-r--r--config-default.yml1
4 files changed, 14 insertions, 2 deletions
diff --git a/bot/__main__.py b/bot/__main__.py
index aa1d1aee8..4e0d4a111 100644
--- a/bot/__main__.py
+++ b/bot/__main__.py
@@ -3,7 +3,9 @@ import logging
import discord
import sentry_sdk
from discord.ext.commands import when_mentioned_or
+from sentry_sdk.integrations.aiohttp import AioHttpIntegration
from sentry_sdk.integrations.logging import LoggingIntegration
+from sentry_sdk.integrations.redis import RedisIntegration
from bot import constants, patches
from bot.bot import Bot
@@ -15,7 +17,11 @@ sentry_logging = LoggingIntegration(
sentry_sdk.init(
dsn=constants.Bot.sentry_dsn,
- integrations=[sentry_logging]
+ integrations=[
+ sentry_logging,
+ AioHttpIntegration(),
+ RedisIntegration(),
+ ]
)
bot = Bot(
diff --git a/bot/cogs/moderation/modlog.py b/bot/cogs/moderation/modlog.py
index 9d28030d9..41472c64c 100644
--- a/bot/cogs/moderation/modlog.py
+++ b/bot/cogs/moderation/modlog.py
@@ -555,6 +555,10 @@ class ModLog(Cog, name="ModLog"):
channel = message.channel
author = message.author
+ # Ignore DMs.
+ if not message.guild:
+ return
+
if message.guild.id != GuildConstant.id or channel.id in GuildConstant.modlog_blacklist:
return
diff --git a/bot/cogs/stats.py b/bot/cogs/stats.py
index 4ebb6423c..d42f55466 100644
--- a/bot/cogs/stats.py
+++ b/bot/cogs/stats.py
@@ -36,7 +36,8 @@ class Stats(Cog):
if message.guild.id != Guild.id:
return
- if message.channel.category.id == Categories.modmail:
+ cat = getattr(message.channel, "category", None)
+ if cat is not None and cat.id == Categories.modmail:
if message.channel.id != Channels.incidents:
# Do not report modmail channels to stats, there are too many
# of them for interesting statistics to be drawn out of this.
diff --git a/config-default.yml b/config-default.yml
index 2c85f5ef3..3a1bdae54 100644
--- a/config-default.yml
+++ b/config-default.yml
@@ -297,6 +297,7 @@ filter:
- 613425648685547541 # Discord Developers
- 185590609631903755 # Blender Hub
- 420324994703163402 # /r/FlutterDev
+ - 488751051629920277 # Python Atlanta
domain_blacklist:
- pornhub.com