diff options
author | 2021-08-26 15:06:54 +0200 | |
---|---|---|
committer | 2021-08-26 15:06:54 +0200 | |
commit | 8cac7f077b14265783ae558fff65cbcd2bef00d6 (patch) | |
tree | 1090900759f235ba986198c2d137787da02564db /bot/exts | |
parent | Merge pull request #795 from D0rs4n/pr/wikipediaissue (diff) | |
parent | Limit internal eval commands to owner if bot in debug mode (diff) |
Merge pull request #818 from python-discord/int-eval-owner-check
Limit internal eval to bot owner when in debug mode
Diffstat (limited to 'bot/exts')
-rw-r--r-- | bot/exts/internal_eval/_internal_eval.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bot/exts/internal_eval/_internal_eval.py b/bot/exts/internal_eval/_internal_eval.py index 56bf5add..b7749144 100644 --- a/bot/exts/internal_eval/_internal_eval.py +++ b/bot/exts/internal_eval/_internal_eval.py @@ -7,7 +7,7 @@ import discord from discord.ext import commands from bot.bot import Bot -from bot.constants import Roles +from bot.constants import Client, Roles from bot.utils.decorators import with_role from bot.utils.extensions import invoke_help_command from ._helpers import EvalContext @@ -41,6 +41,9 @@ class InternalEval(commands.Cog): self.bot = bot self.locals = {} + if Client.debug: + self.internal_group.add_check(commands.is_owner().predicate) + @staticmethod def shorten_output( output: str, |