Discord.js: Leave voice channel command no long working since port to V12

Created on 10 Apr 2020  路  2Comments  路  Source: discordjs/discord.js

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?

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().

All 2 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kvn1351 picture kvn1351  路  3Comments

smchase picture smchase  路  3Comments

tiritto picture tiritto  路  3Comments

ghost picture ghost  路  3Comments

Blumlaut picture Blumlaut  路  3Comments