From 918e1b9ca628abd7867812b32096d05dcf69f32f Mon Sep 17 00:00:00 2001 From: kwzrd Date: Thu, 9 Jul 2020 12:07:30 +0200 Subject: 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 <51753506+vivax3794@users.noreply.github.com> --- bot/cogs/moderation/incidents.py | 6 +++--- 1 file 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} -- cgit v1.2.3