mikeshardmind / SinbadCogs

A set of community resources
Apache License 2.0
50 stars 47 forks source link

Running command with no output in `shelld` raises #247

Closed Jackenmen closed 4 years ago

Jackenmen commented 4 years ago

Describe the bug

  1. Run [p]shelld echo ""
  2. See the error:
    
    Exception in command 'shelld'
    Traceback (most recent call last):
    File "/home/ubuntu/red-venv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
    File "/home/ubuntu/red-data/cogs/CogManager/cogs/devtools/runner.py", line 139, in shelld
    await menu(ctx, pages, DEFAULT_CONTROLS)
    File "/home/ubuntu/red-venv/lib/python3.8/site-packages/redbot/core/utils/menus.py", line 60, in menu
    if not isinstance(pages[0], (discord.Embed, str)):
    IndexError: list index out of range

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

Traceback (most recent call last): File "/home/ubuntu/red-venv/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 903, in invoke await ctx.command.invoke(ctx) File "/home/ubuntu/red-venv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 830, in invoke await injected(*ctx.args, **ctx.kwargs) File "/home/ubuntu/red-venv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped raise CommandInvokeError(exc) from exc discord.ext.commands.errors.CommandInvokeError: Command raised an exception: IndexError: list index out of range


**Debug info**
The output from the `[p]debuginfo` command

Debug Info for Red Red version 3.4.0.dev1 Python version 3.8.2 (64bit) Discord.py version 1.4.0a Pip version 20.1.1 System arch x86_64 User ubuntu OS version Ubuntu 20.04 Python executable /home/ubuntu/red-venv/bin/python Storage type JSON