aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar kwzrd <[email protected]>2020-07-09 12:07:30 +0200
committerGravatar kwzrd <[email protected]>2020-07-09 12:07:30 +0200
commit918e1b9ca628abd7867812b32096d05dcf69f32f (patch)
treebf5689d65005eb34347441ecad0eb194bad6c74f
parentMerge 'master' into 'kwzrd/incidents'; resolve mod pkg init conflict (diff)
Incidents: use `moderation_roles` constant
Better than building the set manually. Tested against regression by comparing the two sets for equality. Suggested by vivax. Co-authored-by: vivax3794 <[email protected]>
-rw-r--r--bot/cogs/moderation/incidents.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bot/cogs/moderation/incidents.py b/bot/cogs/moderation/incidents.py
index 1a12c8bbd..be46c8202 100644
--- a/bot/cogs/moderation/incidents.py
+++ b/bot/cogs/moderation/incidents.py
@@ -8,7 +8,7 @@ import discord
from discord.ext.commands import Cog
from bot.bot import Bot
-from bot.constants import Channels, Colours, Emojis, Roles, Webhooks
+from bot.constants import Channels, Colours, Emojis, Guild, Webhooks
from bot.utils.messages import sub_clyde
log = logging.getLogger(__name__)
@@ -35,8 +35,8 @@ class Signal(Enum):
INVESTIGATING = Emojis.incident_investigating
-# Reactions from roles not listed here will be removed
-ALLOWED_ROLES: t.Set[int] = {Roles.moderators, Roles.admins, Roles.owners}
+# Reactions from non-mod roles will be removed
+ALLOWED_ROLES: t.Set[int] = set(Guild.moderation_roles)
# Message must have all of these emoji to pass the `has_signals` check
ALL_SIGNALS: t.Set[str] = {signal.value for signal in Signal}