From 3cb17116be9c8d23334424a4a05d7a1c2ea01ecc Mon Sep 17 00:00:00 2001 From: Kowlin <10947836+Kowlin@users.noreply.github.com> Date: Thu, 22 Dec 2022 23:41:52 +0100 Subject: [PATCH] Revert ``mock`` and ``mockmsg`` back to a guild_only state (#5926) --- redbot/core/dev_commands.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/redbot/core/dev_commands.py b/redbot/core/dev_commands.py index 27db6af4e..9fea9dc8c 100644 --- a/redbot/core/dev_commands.py +++ b/redbot/core/dev_commands.py @@ -359,9 +359,10 @@ class Dev(commands.Cog): else: await ctx.send(_("The REPL session in this channel is now paused.")) + @commands.guild_only() @commands.command() @checks.is_owner() - async def mock(self, ctx, user: discord.User, *, command): + async def mock(self, ctx, user: discord.Member, *, command): """Mock another user invoking a command. The prefix must not be entered. @@ -372,9 +373,10 @@ class Dev(commands.Cog): ctx.bot.dispatch("message", msg) + @commands.guild_only() @commands.command(name="mockmsg") @checks.is_owner() - async def mock_msg(self, ctx, user: discord.User, *, content: str = ""): + async def mock_msg(self, ctx, user: discord.Member, *, content: str = ""): """Dispatch a message event as if it were sent by a different user. Current message is used as a base (including attachments, embeds, etc.),