aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar kwzrd <[email protected]>2020-06-11 18:45:50 +0200
committerGravatar kwzrd <[email protected]>2020-06-11 18:45:50 +0200
commitd520203717b8aaa6358071978a1ac9a23418d1c9 (patch)
tree0148c286118261f26a56a52d4f971bcd8dad69da
parentMerge branch 'origin/master' into kwzrd/incidents (diff)
Incidents: define allowed roles and emoji
These serve as whitelists, i.e. any reaction using an emoji not explicitly allowed, or from a user not specifically allowed, will be rejected. Such reactions will be removed by the bot.
-rw-r--r--bot/cogs/moderation/incidents.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/bot/cogs/moderation/incidents.py b/bot/cogs/moderation/incidents.py
index baceddf0c..49180da7c 100644
--- a/bot/cogs/moderation/incidents.py
+++ b/bot/cogs/moderation/incidents.py
@@ -4,7 +4,7 @@ from enum import Enum
from discord.ext.commands import Cog
from bot.bot import Bot
-from bot.constants import Emojis
+from bot.constants import Emojis, Roles
log = logging.getLogger(__name__)
@@ -17,6 +17,10 @@ class Signal(Enum):
INVESTIGATING = Emojis.incident_investigating
+ALLOWED_ROLES: t.Set[int] = {Roles.moderators, Roles.admins, Roles.owners}
+ALLOWED_EMOJI: t.Set[str] = {signal.value for signal in Signal}
+
+
class Incidents(Cog):
"""Automation for the #incidents channel."""