From 0df47ccbfc3b399376de1f82e0ee09e96a98f76c Mon Sep 17 00:00:00 2001 From: wookie184 Date: Thu, 26 Aug 2021 13:54:17 +0100 Subject: Make bot debug constant default to true --- bot/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bot') diff --git a/bot/constants.py b/bot/constants.py index bb602361..6323af80 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -134,7 +134,7 @@ class Client(NamedTuple): prefix = environ.get("PREFIX", ".") token = environ.get("BOT_TOKEN") sentry_dsn = environ.get("BOT_SENTRY_DSN") - debug = environ.get("BOT_DEBUG", "").lower() == "true" + debug = environ.get("BOT_DEBUG", "true").lower() == "true" github_bot_repo = "https://github.com/python-discord/sir-lancebot" # Override seasonal locks: 1 (January) to 12 (December) month_override = int(environ["MONTH_OVERRIDE"]) if "MONTH_OVERRIDE" in environ else None -- cgit v1.2.3 From 48d43ea492a5f4bbbf67dd32dc6e5bff4f5053d2 Mon Sep 17 00:00:00 2001 From: wookie184 Date: Thu, 26 Aug 2021 13:57:30 +0100 Subject: Limit internal eval commands to owner if bot in debug mode --- bot/exts/internal_eval/_internal_eval.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bot') 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, -- cgit v1.2.3