Rik.Pagano
DIAdiscord.js - Imagine an app
•Created by Rik.Pagano on 11/18/2023 in #djs-questions
'BitFieldInvalid'
This is the code, I hope somebody could help me
const { Client, GatewayIntentBits } = require('discord.js');
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.VoiceStates,
],
});
client.once('ready', () => {
console.log('Bot is ready!');
});
client.once('ready', () => {
console.log('Bot is ready!');
});
client.on('messageCreate', async (message) => {
if (message.content.toLowerCase() === '!playmp3') {
const connection = await message.member.voice.channel.join();
const dispatcher = connection.play('link');
dispatcher.on('finish', () => {
message.member.voice.channel.leave();
});
}
});
client.login('token');
5 replies