diff options
| author | 2020-05-26 02:21:58 +0100 | |
|---|---|---|
| committer | 2020-05-26 02:21:58 +0100 | |
| commit | 6cedfdc0b24ea44b86fca039c9d7335072abede6 (patch) | |
| tree | baef079a9f3cec44331f6c42711bb73ae8b65444 | |
| parent | Merge pull request #936 from python-discord/bug/filters/929/invalid-invites (diff) | |
[stats] Do not report modmail channels to stats
| -rw-r--r-- | bot/cogs/stats.py | 8 | ||||
| -rw-r--r-- | bot/constants.py | 2 | ||||
| -rw-r--r-- | config-default.yml | 2 | 
3 files changed, 11 insertions, 1 deletions
| diff --git a/bot/cogs/stats.py b/bot/cogs/stats.py index 9baf222e2..14409ecb0 100644 --- a/bot/cogs/stats.py +++ b/bot/cogs/stats.py @@ -6,7 +6,7 @@ from discord.ext.commands import Cog, Context  from discord.ext.tasks import loop  from bot.bot import Bot -from bot.constants import Channels, Guild, Stats as StatConf +from bot.constants import Categories, Channels, Guild, Stats as StatConf  CHANNEL_NAME_OVERRIDES = { @@ -36,6 +36,12 @@ class Stats(Cog):          if message.guild.id != Guild.id:              return +        if message.channel.category.id == Categories.modmail: +            if message.channel.id != Channels.incidents: +                # Do not report modmail channels to stats, there are too many +                # of them for interesting statistics to be drawn out of this. +                return +          reformatted_name = message.channel.name.replace('-', '_')          if CHANNEL_NAME_OVERRIDES.get(message.channel.id): diff --git a/bot/constants.py b/bot/constants.py index 3003c9d36..39de2ee41 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -365,6 +365,7 @@ class Categories(metaclass=YAMLGetter):      help_available: int      help_in_use: int      help_dormant: int +    modmail: int  class Channels(metaclass=YAMLGetter): @@ -384,6 +385,7 @@ class Channels(metaclass=YAMLGetter):      esoteric: int      helpers: int      how_to_get_help: int +    incidents: int      message_log: int      meta: int      mod_alerts: int diff --git a/config-default.yml b/config-default.yml index 9a28be700..c7d25894c 100644 --- a/config-default.yml +++ b/config-default.yml @@ -118,6 +118,7 @@ guild:          help_available:                     691405807388196926          help_in_use:                        696958401460043776          help_dormant:                       691405908919451718 +        modmail:                            714494672835444826      channels:          announcements:                              354619224620138496 @@ -164,6 +165,7 @@ guild:          mod_spam:           &MOD_SPAM       620607373828030464          organisation:       &ORGANISATION   551789653284356126          staff_lounge:       &STAFF_LOUNGE   464905259261755392 +        incidents:                          714214212200562749          # Voice          admins_voice:       &ADMINS_VOICE   500734494840717332 | 
