diff options
| author | 2019-10-21 19:34:03 +0530 | |
|---|---|---|
| committer | 2019-10-21 19:34:03 +0530 | |
| commit | d16fd998fb46702d01d409e68c4132fb07722249 (patch) | |
| tree | fb6c4763a819e3b992c464318f4467938818e7f2 | |
| parent | Add missing channels to the config (diff) | |
Add #admin-spam channel to moderation channels list
- Change doc string for cog_check method
| -rw-r--r-- | bot/cogs/moderation/management.py | 2 | ||||
| -rw-r--r-- | bot/constants.py | 3 | ||||
| -rw-r--r-- | config-default.yml | 1 |
3 files changed, 4 insertions, 2 deletions
diff --git a/bot/cogs/moderation/management.py b/bot/cogs/moderation/management.py index b7f5db2f5..44a508436 100644 --- a/bot/cogs/moderation/management.py +++ b/bot/cogs/moderation/management.py @@ -256,7 +256,7 @@ class ModManagement(commands.Cog): # This cannot be static (must have a __func__ attribute). def cog_check(self, ctx: Context) -> bool: - """Only allow moderators to invoke the commands in this cog.""" + """Only allow moderators from moderator channels to invoke the commands in this cog.""" checks = [ with_role_check(ctx, *constants.MODERATION_ROLES), in_channel_check(ctx, *constants.MODERATION_CHANNELS) diff --git a/bot/constants.py b/bot/constants.py index f22668a2b..e4086d8e6 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -328,6 +328,7 @@ class Channels(metaclass=YAMLGetter): subsection = "channels" admins: int + admin_spam: int announcements: int big_brother_logs: int bot: int @@ -503,7 +504,7 @@ MODERATION_ROLES = Roles.moderator, Roles.admin, Roles.owner STAFF_ROLES = Roles.helpers, Roles.moderator, Roles.admin, Roles.owner # Default Channel combinations -MODERATION_CHANNELS = Channels.admins, Channels.mod_alerts, Channels.mods, Channels.mod_spam +MODERATION_CHANNELS = Channels.admins, Channels.admin_spam, Channels.mod_alerts, Channels.mods, Channels.mod_spam # Bot replies diff --git a/config-default.yml b/config-default.yml index 4b8185aaa..cd8f5600e 100644 --- a/config-default.yml +++ b/config-default.yml @@ -90,6 +90,7 @@ guild: channels: admins: &ADMINS 365960823622991872 + admin-spam: 563594791770914816 announcements: 354619224620138496 big_brother_logs: &BBLOGS 468507907357409333 bot: 267659945086812160 |