Skip to content

[cookies] list index out of range #79

@ltzmax

Description

@ltzmax

Heya ran command steal, and it errored, cookies is set to global.

Exception in command 'steal'
Traceback (most recent call last):
  File "/redenv/lib/python3.9/site-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "/root/redbot/cogs/CogManager/cogs/cookies/cookies.py", line 137, in steal
    target_id = random.choice(ids)
  File "/usr/lib/python3.9/random.py", line 347, in choice
    return seq[self._randbelow(len(seq))]
IndexError: list index out of range

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

Traceback (most recent call last):
  File "/redenv/lib/python3.9/site-packages/discord/ext/commands/bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "/redenv/lib/python3.9/site-packages/discord/ext/commands/core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/redenv/lib/python3.9/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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions