mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
refactor: new node features (#5132)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
This commit is contained in:
@@ -40,7 +40,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.cache.get(m.content.split(' ')[1]) || m.member.voice.channel;
|
||||
const channel = m.guild.channels.cache.get(m.content.split(' ')[1]) ?? m.member.voice.channel;
|
||||
if (channel && channel.type === 'voice') {
|
||||
channel.join().then(conn => {
|
||||
conn.receiver.createStream(m.author, true).on('data', b => console.log(b.toString()));
|
||||
|
||||
Reference in New Issue
Block a user