Skip to content

IndexError when re-evaluating snekbox code #831

@sentry

Description

@sentry

Sentry Issue: BOT-2C

IndexError: list index out of range
  File "discord/ext/commands/core.py", line 83, in wrapped
    ret = await coro(*args, **kwargs)
  File "bot/cogs/snekbox.py", line 281, in eval_command
    code = await self.continue_eval(ctx, response)
  File "bot/cogs/snekbox.py", line 235, in continue_eval
    code = new_message.content.split(' ', maxsplit=1)[1]

Using get_context seems to be a more robust option than parsing the message ourselves. Either way, if it can't parse it, it should just assume the entire content is the code.

Metadata

Metadata

Assignees

Labels

a: utilityRelated to utility commands: (bot, eval, extensions, jams, reminders, snekbox, utils)p: 2 - normalNormal Priorityt: bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions