diff options
| author | 2020-07-09 12:07:30 +0200 | |
|---|---|---|
| committer | 2020-07-09 12:07:30 +0200 | |
| commit | 918e1b9ca628abd7867812b32096d05dcf69f32f (patch) | |
| tree | bf5689d65005eb34347441ecad0eb194bad6c74f | |
| parent | Merge '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.py | 6 |
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} |