I recently switched from v11.6.4 to V12 and due to the changes of discord.js v12, I can no longer use msg.guilds.voiceChannel.leave() and call it from an external file. I have to use connection.disconnect(). This doesn't work tho because if I run the command foo!leave, then connection is undefined because it's in an external file.
How would I go about fixing this, do I have to grab the connection constant somehow?
Please don't ignore the issue template.
The issue tracker is for bugs, not support, for support head to the Discord server.
Quick answer:
You still could use guild.voice.channel.leave().
Please don't ignore the issue template.
The issue tracker is for bugs, not support, for support head to the Discord server.
Quick answer:
You still could use
guild.voice.channel.leave().
Real sorry, I am on GitHub mobile and it's still pretty scuffed so many features are missing, thank you though.
Most helpful comment
Please don't ignore the issue template.
The issue tracker is for bugs, not support, for support head to the Discord server.
Quick answer:
You still could use
guild.voice.channel.leave().