diff --git a/changelog.d/customcom/3416.bugfix.rst b/changelog.d/customcom/3416.bugfix.rst new file mode 100644 index 000000000..672d5f032 --- /dev/null +++ b/changelog.d/customcom/3416.bugfix.rst @@ -0,0 +1 @@ +Fixes error on exiting customcom interactive menu. \ No newline at end of file diff --git a/redbot/cogs/customcom/customcom.py b/redbot/cogs/customcom/customcom.py index 5b163f046..b9c674559 100644 --- a/redbot/cogs/customcom/customcom.py +++ b/redbot/cogs/customcom/customcom.py @@ -227,6 +227,9 @@ class CustomCommands(commands.Cog): await ctx.send(_("There already exists a bot command with the same name.")) return responses = await self.commandobj.get_responses(ctx=ctx) + if not responses: + await ctx.send(_("Custom command process cancelled.")) + return try: await self.commandobj.create(ctx=ctx, command=command, response=responses) await ctx.send(_("Custom command successfully added."))