mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
voice: remove createReceiver, just use VoiceConnection.receiver
This commit is contained in:
@@ -41,8 +41,7 @@ client.on('message', m => {
|
||||
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();
|
||||
receiver.createStream(m.author, true).on('data', b => console.log(b.toString()));
|
||||
conn.receiver.createStream(m.author, true).on('data', b => console.log(b.toString()));
|
||||
conn.player.on('error', (...e) => console.log('player', ...e));
|
||||
if (!connections.has(m.guild.id)) connections.set(m.guild.id, { conn, queue: [] });
|
||||
m.reply('ok!');
|
||||
|
||||
Reference in New Issue
Block a user