Skip to content

Crash after adding a lot of sounds to queue and then leaving without finishing it to add them while being connected on voice channel. #48

@Wikijito7

Description

@Wikijito7
          Crash after adding a lot of sounds to queue and then leaving without finishing it to add them while being connected on voice channel.
ERROR:root:on_command_error >> Exception caught when running command
Traceback (most recent call last):
  File "/home/wokis/.local/lib/python3.9/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/home/wokis/ecibot-dev/main.py", line 259, in youtube
    await add_to_queue(ctx.guild.id, ctx.author.voice.channel, ctx.channel, sound)
AttributeError: 'NoneType' object has no attribute 'channel'

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

Traceback (most recent call last):
  File "/home/wokis/.local/lib/python3.9/site-packages/discord/ext/commands/bot.py", line 1350, in invoke
    await ctx.command.invoke(ctx)
  File "/home/wokis/.local/lib/python3.9/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/home/wokis/.local/lib/python3.9/site-packages/discord/ext/commands/core.py", line 244, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'channel'
ERROR:root:on_command_error >> Exception caught when running command
Traceback (most recent call last):
  File "/home/wokis/.local/lib/python3.9/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/home/wokis/ecibot-dev/main.py", line 259, in youtube
    await add_to_queue(ctx.guild.id, ctx.author.voice.channel, ctx.channel, sound)
AttributeError: 'NoneType' object has no attribute 'channel'

Originally posted by @Wikijito7 in #42 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingkt-migrationWill be done once Bot is migrated to Kotlin

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions