diff options
-rw-r--r-- | azure-pipelines.yml | 9 | ||||
-rw-r--r-- | bot/cogs/verification.py | 11 |
2 files changed, 15 insertions, 5 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml index fe7486a5c..bc523fb31 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,11 +1,10 @@ # https://aka.ms/yaml variables: - ENV LIBRARY_PATH: /lib:/usr/lib - ENV PIPENV_HIDE_EMOJIS: 1 - ENV PIPENV_IGNORE_VIRTUALENVS: 1 - ENV PIPENV_NOSPIN: 1 - ENV PIPENV_VENV_IN_PROJECT: 1 + PIPENV_HIDE_EMOJIS: 1 + PIPENV_IGNORE_VIRTUALENVS: 1 + PIPENV_NOSPIN: 1 + PIPENV_VENV_IN_PROJECT: 1 jobs: - job: test diff --git a/bot/cogs/verification.py b/bot/cogs/verification.py index 8d29a4bee..56fcd63eb 100644 --- a/bot/cogs/verification.py +++ b/bot/cogs/verification.py @@ -151,6 +151,17 @@ class Verification: f"{ctx.author.mention} Unsubscribed from <#{Channels.announcements}> notifications." ) + @staticmethod + def __global_check(ctx: Context): + """ + Block any command within the verification channel that is not !accept. + """ + + if ctx.channel.id == Channels.verification: + return ctx.command.name == "accept" + else: + return True + def setup(bot): bot.add_cog(Verification(bot)) |