HTSTEM / MusicBot

A music bot we decided to make.
MIT License
3 stars 3 forks source link

make !reconnect have the bot leave+reconnect, instead of just reconnecting #31

Open qixils opened 6 years ago

qixils commented 6 years ago

basically turn !reconnect's current functionality into what you would get from doing !disconnect, followed by !reconnect

Bottersnike commented 6 years ago

That's what it already does? No?

Tantusar commented 6 years ago

No, that is not what it already does. It just says, "Already connected, sucks to be you." Okay, it's a little more polite.

Bottersnike commented 6 years ago

I'm pretty sure I patched that.

Bottersnike commented 6 years ago

For context: https://github.com/HTSTEM/MusicBot/blob/acf88a8b266ffc6690ae2aad186cb476aaace685/musicbot/cogs/music.py#L849 it locates any voice channel it's connected to and force-disconnects.

Bottersnike commented 6 years ago

Ensured fixed with https://github.com/HTSTEM/MusicBot/commit/145621957d7f68577c850590f41c8a3f22aa7a16 Please reopen if continuing.

qixils commented 6 years ago

image

Bottersnike commented 6 years ago

Right, so, https://github.com/HTSTEM/MusicBot/blob/acf88a8b266ffc6690ae2aad186cb476aaace685/musicbot/cogs/music.py#L852 ensures that if it has a reference to the voice channel anywhere, it disconnects. The problem would appear to be that for some reason it no longer has a ref.

qixils commented 6 years ago

image