aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-02-23 13:08:40 -0800
committerGravatar MarkKoz <[email protected]>2020-02-23 13:10:05 -0800
commit66fa960fcf0f1d11af20ec1c77039e9ca791f4dc (patch)
tree1226d67f8b39af272e40168346cab99439bce754
parentConfig: replace abbreviated lists with normal ones (diff)
Constants: rename Guild.Constant.ignored to modlog_blacklist
This name better explains what the list is for.
-rw-r--r--bot/cogs/moderation/modlog.py10
-rw-r--r--bot/constants.py2
-rw-r--r--config-default.yml3
3 files changed, 8 insertions, 7 deletions
diff --git a/bot/cogs/moderation/modlog.py b/bot/cogs/moderation/modlog.py
index 94e646248..59ae6b587 100644
--- a/bot/cogs/moderation/modlog.py
+++ b/bot/cogs/moderation/modlog.py
@@ -538,7 +538,7 @@ class ModLog(Cog, name="ModLog"):
channel = message.channel
author = message.author
- if message.guild.id != GuildConstant.id or channel.id in GuildConstant.ignored:
+ if message.guild.id != GuildConstant.id or channel.id in GuildConstant.modlog_blacklist:
return
self._cached_deletes.append(message.id)
@@ -591,7 +591,7 @@ class ModLog(Cog, name="ModLog"):
@Cog.listener()
async def on_raw_message_delete(self, event: discord.RawMessageDeleteEvent) -> None:
"""Log raw message delete event to message change log."""
- if event.guild_id != GuildConstant.id or event.channel_id in GuildConstant.ignored:
+ if event.guild_id != GuildConstant.id or event.channel_id in GuildConstant.modlog_blacklist:
return
await asyncio.sleep(1) # Wait here in case the normal event was fired
@@ -635,7 +635,7 @@ class ModLog(Cog, name="ModLog"):
if (
not msg_before.guild
or msg_before.guild.id != GuildConstant.id
- or msg_before.channel.id in GuildConstant.ignored
+ or msg_before.channel.id in GuildConstant.modlog_blacklist
or msg_before.author.bot
):
return
@@ -717,7 +717,7 @@ class ModLog(Cog, name="ModLog"):
if (
not message.guild
or message.guild.id != GuildConstant.id
- or message.channel.id in GuildConstant.ignored
+ or message.channel.id in GuildConstant.modlog_blacklist
or message.author.bot
):
return
@@ -769,7 +769,7 @@ class ModLog(Cog, name="ModLog"):
"""Log member voice state changes to the voice log channel."""
if (
member.guild.id != GuildConstant.id
- or (before.channel and before.channel.id in GuildConstant.ignored)
+ or (before.channel and before.channel.id in GuildConstant.modlog_blacklist)
):
return
diff --git a/bot/constants.py b/bot/constants.py
index 63f7b15ee..9855421c9 100644
--- a/bot/constants.py
+++ b/bot/constants.py
@@ -428,7 +428,7 @@ class Guild(metaclass=YAMLGetter):
section = "guild"
id: int
- ignored: List[int]
+ modlog_blacklist: List[int]
staff_channels: List[int]
reminder_whitelist: List[int]
diff --git a/config-default.yml b/config-default.yml
index 05059fbee..b253f32e8 100644
--- a/config-default.yml
+++ b/config-default.yml
@@ -180,7 +180,8 @@ guild:
- *MOD_SPAM
- *ORGANISATION
- ignored:
+ # Modlog cog ignores events which occur in these channels
+ modlog_blacklist:
- *ADMINS
- *ADMINS_VOICE
- *ATTACH_LOG