# Buggy code
async def cc_create_random(self, ctx: commands.Context, command: str.lower):
    """Create a CC where it will randomly choose a response!

    Note: This command is interactive.
    """
    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
    responses = await self.commandobj.get_responses(ctx=ctx)
    try:
        await self.commandobj.create(ctx=ctx, command=command, response=responses)
        await ctx.send(_("Custom command successfully added."))
    except AlreadyExists:
        await ctx.send(
            _("This command already exists. Use `{command}` to edit it.").format(
                command="{}customcom edit".format(ctx.prefix)
            )
        )


# Traceback (IndexError)
Exception in command 'customcom create random'
Traceback (most recent call last):
File "/root/.local/lib/python3.8/site-packages/discord/ext/commands/core.py", line 79, in wrapped
ret = await coro(*args, **kwargs)
File "/root/.local/lib/python3.8/site-packages/redbot/cogs/customcom/customcom.py", line 231, in cc_create_random
await self.commandobj.create(ctx=ctx, command=command, response=responses)
File "/root/.local/lib/python3.8/site-packages/redbot/cogs/customcom/customcom.py", line 109, in create
ctx.cog.prepare_args(response if isinstance(response, str) else response[0])
IndexError: list index out of range

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/root/.local/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 863, in invoke
await ctx.command.invoke(ctx)
File "/root/.local/lib/python3.8/site-packages/redbot/core/commands/commands.py", line 631, in invoke
await super().invoke(ctx)
File "/root/.local/lib/python3.8/site-packages/discord/ext/commands/core.py", line 1158, in invoke
await ctx.invoked_subcommand.invoke(ctx)
File "/root/.local/lib/python3.8/site-packages/redbot/core/commands/commands.py", line 631, in invoke
await super().invoke(ctx)
File "/root/.local/lib/python3.8/site-packages/discord/ext/commands/core.py", line 1158, in invoke
await ctx.invoked_subcommand.invoke(ctx)
File "/root/.local/lib/python3.8/site-packages/discord/ext/commands/core.py", line 728, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/root/.local/lib/python3.8/site-packages/discord/ext/commands/core.py", line 88, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: IndexError: list index out of range

# Fixed code
async def cc_create_random(self, ctx: commands.Context, command: str.lower):
    """Create a CC where it will randomly choose a response!

    Note: This command is interactive.
    """
    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
    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."))
    except AlreadyExists:
        await ctx.send(
            _("This command already exists. Use `{command}` to edit it.").format(
                command="{}customcom edit".format(ctx.prefix)
            )
        )