diff options
| author | 2020-06-12 15:05:48 +0200 | |
|---|---|---|
| committer | 2020-06-12 15:05:48 +0200 | |
| commit | f7756b0246dec293f9918f3ea3ac4d6139affddd (patch) | |
| tree | 7df2edfb6ac22ffe0d36b35f201916b3be0b85cd | |
| parent | Incidents: implement `own_reactions` helper (diff) | |
Incidents: implement `has_signals` helper
| -rw-r--r-- | bot/cogs/moderation/incidents.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bot/cogs/moderation/incidents.py b/bot/cogs/moderation/incidents.py index 8a49ec8b1..0d146bdc5 100644 --- a/bot/cogs/moderation/incidents.py +++ b/bot/cogs/moderation/incidents.py @@ -40,6 +40,12 @@ def own_reactions(message: discord.Message) -> t.Set[str]: return {str(reaction.emoji) for reaction in message.reactions if reaction.me} +def has_signals(message: discord.Message) -> bool: + """True if `message` already has all `Signal` reactions, False otherwise.""" + missing_signals = ALLOWED_EMOJI - own_reactions(message) + return not missing_signals + + class Incidents(Cog): """Automation for the #incidents channel.""" |