JukeBot-Org / JukeBot

A self-hostable audio streaming bot for Discord.
https://jukebot.app
GNU General Public License v3.0
1 stars 0 forks source link

!play does not work once JukeBot has auto-DC'd from a channel #14

Closed squigjess closed 3 years ago

squigjess commented 3 years ago
Ignoring exception in on_command_error
Traceback (most recent call last):
  File "/home/jess/Projects/JukeBot/JukeBot-Proj/venv/lib/python3.9/site-packages/nextcord/ext/commands/core.py", line 168, in wrapped
    ret = await coro(*args, **kwargs)
  File "/home/jess/Projects/JukeBot/JukeBot-Proj/JukeBot/audio_commands.py", line 213, in play
    await self.play_audio(ctx)
  File "/home/jess/Projects/JukeBot/JukeBot-Proj/JukeBot/audio_commands.py", line 127, in play_audio
    self.vc.play(discord.FFmpegPCMAudio(media_url, **self.FFMPEG_OPTIONS), after=lambda e: self.play_next(ctx))
AttributeError: 'str' object has no attribute 'play'

Also to check: Does this also occur when bot is manually DC'd by a user?

squigjess commented 3 years ago

Confirmed. Once bot is manually DC'd from a voice channel by a user, the issue remains. However, the root cause is different:

Ignoring exception in on_command_error
Traceback (most recent call last):
  File "/home/jess/Projects/JukeBot/JukeBot-Proj/venv/lib/python3.9/site-packages/nextcord/ext/commands/core.py", line 168, in wrapped
    ret = await coro(*args, **kwargs)
  File "/home/jess/Projects/JukeBot/JukeBot-Proj/JukeBot/audio_commands.py", line 215, in play
    await self.play_audio(ctx)
  File "/home/jess/Projects/JukeBot/JukeBot-Proj/JukeBot/audio_commands.py", line 121, in play_audio
    self.vc = await self.queue[0].voice_channel.connect()
  File "/home/jess/Projects/JukeBot/JukeBot-Proj/venv/lib/python3.9/site-packages/nextcord/abc.py", line 1669, in connect
    raise ClientException('Already connected to a voice channel.')
nextcord.errors.ClientException: Already connected to a voice channel.
squigjess commented 3 years ago

Original issue resolved. Splitting ticket into another one in order to better track the manual disconnect issue.