diff options
| author | 2021-12-30 23:41:58 +0000 | |
|---|---|---|
| committer | 2021-12-30 23:41:58 +0000 | |
| commit | 17bcd45c68f144f3b88fdfdf05bd0db654c0322e (patch) | |
| tree | ad07a6a449a322165d7246699908256c2df7a047 /bot/exts/core/internal_eval | |
| parent | Migrate to `og_blurple` (diff) | |
| parent | Merge pull request #994 from python-discord/logging-in-AoC-completer-task (diff) | |
Merge remote-tracking branch 'origin/main' into main
# Conflicts:
# bot/exts/holidays/halloween/candy_collection.py
Diffstat (limited to 'bot/exts/core/internal_eval')
| -rw-r--r-- | bot/exts/core/internal_eval/_internal_eval.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bot/exts/core/internal_eval/_internal_eval.py b/bot/exts/core/internal_eval/_internal_eval.py index 4f6b4321..5b5461f0 100644 --- a/bot/exts/core/internal_eval/_internal_eval.py +++ b/bot/exts/core/internal_eval/_internal_eval.py @@ -10,6 +10,7 @@ from bot.bot import Bot 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 __all__ = ["InternalEval"] @@ -146,14 +147,14 @@ class InternalEval(commands.Cog): await self._send_output(ctx, eval_context.format_output()) @commands.group(name="internal", aliases=("int",)) - @with_role(Roles.admin) + @with_role(Roles.admins) async def internal_group(self, ctx: commands.Context) -> None: """Internal commands. Top secret!""" if not ctx.invoked_subcommand: await invoke_help_command(ctx) @internal_group.command(name="eval", aliases=("e",)) - @with_role(Roles.admin) + @with_role(Roles.admins) async def eval(self, ctx: commands.Context, *, code: str) -> None: """Run eval in a REPL-like format.""" if match := list(FORMATTED_CODE_REGEX.finditer(code)): @@ -172,7 +173,7 @@ class InternalEval(commands.Cog): await self._eval(ctx, code) @internal_group.command(name="reset", aliases=("clear", "exit", "r", "c")) - @with_role(Roles.admin) + @with_role(Roles.admins) async def reset(self, ctx: commands.Context) -> None: """Reset the context and locals of the eval session.""" self.locals = {} |