diff --git a/redbot/cogs/customcom/customcom.py b/redbot/cogs/customcom/customcom.py index f237d2ec3..182e125ad 100644 --- a/redbot/cogs/customcom/customcom.py +++ b/redbot/cogs/customcom/customcom.py @@ -292,6 +292,10 @@ class CustomCommands(commands.Cog): Note: This command is interactive. """ + if any(char.isspace() for char in command): + # Haha, nice try + await ctx.send(_("Custom command names cannot have spaces in them.")) + return if command in (*self.bot.all_commands, *commands.RESERVED_COMMAND_NAMES): await ctx.send(_("There already exists a bot command with the same name.")) return @@ -317,6 +321,10 @@ class CustomCommands(commands.Cog): Example: - `[p]customcom create simple yourcommand Text you want` """ + if any(char.isspace() for char in command): + # Haha, nice try + await ctx.send(_("Custom command names cannot have spaces in them.")) + return if command in (*self.bot.all_commands, *commands.RESERVED_COMMAND_NAMES): await ctx.send(_("There already exists a bot command with the same name.")) return