rewrite voice state handling

This commit is contained in:
Amish Shah
2018-08-10 14:44:59 +01:00
parent 0f63c50c06
commit be5efea461
11 changed files with 187 additions and 144 deletions

View File

@@ -31,8 +31,8 @@ client.on('message', async message => {
if (message.content === '/join') {
// Only try to join the sender's voice channel if they are in one themselves
if (message.member.voiceChannel) {
const connection = await message.member.voiceChannel.join();
if (message.member.voice.channel) {
const connection = await message.member.voice.channel.join();
} else {
message.reply('You need to join a voice channel first!');
}