Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Confessions] Exception in command 'confess' #48

Open
Ryan5453 opened this issue Dec 4, 2020 · 1 comment
Open

[Confessions] Exception in command 'confess' #48

Ryan5453 opened this issue Dec 4, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@Ryan5453
Copy link

Ryan5453 commented Dec 4, 2020

When running [p]confess in DMs with the bot when you don't have a server with a set channel, it generates this traceback

  File "/home/main/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "/home/main/red/cogs/CogManager/cogs/confession/confession.py", line 90, in confess
    await menu(ctx, pages=embeds, controls=SELECT_CONTROLS, message=None, page=0, timeout=20)
  File "/home/main/redenv/lib/python3.8/site-packages/redbot/core/utils/menus.py", line 59, 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/main/redenv/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 903, in invoke
    await ctx.command.invoke(ctx)
  File "/home/main/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 859, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/home/main/redenv/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```

In DMs, the bot sends this

```No server with a confession room, ask your server owners to set it up!
Error in command 'confess'. Check your console or logs for details.```

@Ryan5453 Ryan5453 changed the title Exception in command 'confess' [Confessions] Exception in command 'confess' Dec 4, 2020
@lionirdeadman lionirdeadman added the bug Something isn't working label Dec 5, 2020
@lionirdeadman
Copy link
Member

lionirdeadman commented Dec 5, 2020

Hmmm, sounds like a bug with https://github.com/Jintaku/Jintaku-Cogs-V3/blob/master/confession/confession.py#L71

I'll check it out later, I'm quite busy at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants