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

@@ -33,7 +33,7 @@ client.on('message', m => {
if (!m.guild) return;
if (m.author.id !== '66564597481480192') return;
if (m.content.startsWith('/join')) {
const channel = m.guild.channels.get(m.content.split(' ')[1]) || m.member.voiceChannel;
const channel = m.guild.channels.get(m.content.split(' ')[1]) || m.member.voice.channel;
if (channel && channel.type === 'voice') {
channel.join().then(conn => {
const receiver = conn.createReceiver();