diff options
author | 2019-09-27 16:04:25 +0200 | |
---|---|---|
committer | 2019-09-27 16:04:25 +0200 | |
commit | 63bfe37bb2c3d05bc9e40589988952a705fb7e2e (patch) | |
tree | f8b261b29f75dc88923151fb8e4f4016bb1835b3 | |
parent | Ensure docker containers are published only for master branch bu… (#463) (diff) |
Allow Rockstars and Partners to use !eval.
Anyone who is not a Rockstar, a Partner, or a member of staff
will still be redirected to #bot-commands.
-rw-r--r-- | bot/cogs/snekbox.py | 6 | ||||
-rw-r--r-- | bot/constants.py | 6 | ||||
-rw-r--r-- | config-default.yml | 5 |
3 files changed, 10 insertions, 7 deletions
diff --git a/bot/cogs/snekbox.py b/bot/cogs/snekbox.py index 5accbdb5e..120ceb4e5 100644 --- a/bot/cogs/snekbox.py +++ b/bot/cogs/snekbox.py @@ -7,11 +7,10 @@ from typing import Optional, Tuple from discord.ext.commands import Bot, Cog, Context, command, guild_only -from bot.constants import Channels, STAFF_ROLES, URLs +from bot.constants import Channels, URLs, Roles from bot.decorators import in_channel from bot.utils.messages import wait_for_deletion - log = logging.getLogger(__name__) ESCAPE_REGEX = re.compile("[`\u202E\u200B]{3,}") @@ -34,6 +33,7 @@ RAW_CODE_REGEX = re.compile( ) MAX_PASTE_LEN = 1000 +EVAL_ROLES = (Roles.helpers, Roles.moderator, Roles.admin, Roles.owner, Roles.rockstars, Roles.partners) class Snekbox(Cog): @@ -166,7 +166,7 @@ class Snekbox(Cog): @command(name="eval", aliases=("e",)) @guild_only() - @in_channel(Channels.bot, bypass_roles=STAFF_ROLES) + @in_channel(Channels.bot, bypass_roles=EVAL_ROLES) async def eval_command(self, ctx: Context, *, code: str = None) -> None: """ Run Python code and get the results. diff --git a/bot/constants.py b/bot/constants.py index e1c47889c..1deeaa3b8 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -375,13 +375,15 @@ class Roles(metaclass=YAMLGetter): champion: int contributor: int core_developer: int + helpers: int jammer: int moderator: int muted: int owner: int - verified: int # This is the Developers role on PyDis, here named verified for readability reasons. - helpers: int + partners: int + rockstars: int team_leader: int + verified: int # This is the Developers role on PyDis, here named verified for readability reasons. class Guild(metaclass=YAMLGetter): diff --git a/config-default.yml b/config-default.yml index 403de21ad..38b26f64f 100644 --- a/config-default.yml +++ b/config-default.yml @@ -128,14 +128,15 @@ guild: champion: 430492892331769857 contributor: 295488872404484098 core_developer: 587606783669829632 + helpers: 267630620367257601 jammer: 423054537079783434 moderator: &MOD_ROLE 267629731250176001 muted: &MUTED_ROLE 277914926603829249 owner: &OWNER_ROLE 267627879762755584 - verified: 352427296948486144 - helpers: 267630620367257601 + partners: 323426753857191936 rockstars: &ROCKSTARS_ROLE 458226413825294336 team_leader: 501324292341104650 + verified: 352427296948486144 webhooks: talent_pool: 569145364800602132 |