const Embed = new Discord.MessageEmbed()
.setColor('#ff3f34')
.setTitle('Bem-vindo!')
.setAuthor('Bot de Boas-Vindas')
.setDescription(`Bem-vindo, ${member}, se divirta no nosso servidor!`)
.setThumbnail('https://lh3.googleusercontent.com/proxy/4aBCSj9lo2dv65tBknbAzPaf-29LxNA38p6XqC8tcXl3qhGN-iBpFnsYQeJgU8XHSGi27BR4urrpGrSyZJ3Gj3jFIppf-ED_3-krLHJSfZ_JIdWyt3UoNRYq49zKsHk5SfGCnpw')
channel.send(Embed)
play.js
`async function start()
{
let connection = await message.member.voice.channel.join()
}
module.exports =
{
name: 'play',
description: "Toque uma música!",
execute(message, args)
{
let estouPronto = false;
if (message.content.startsWith('%play '))
{
if (estouPronto)
{
let oQueTocar = message.content.replace('%play ','');
if(Ytld.validateURL(oQueTocar))
{
message.member.voice.channel.connection.play(Ytld());
} else
{
message.reply('Esse link não é um vídeo do youtube!')
}
}
}
}
Issue by CyberByte-js Wednesday Sep 16, 2020 at 20:34 GMT Originally opened as https://github.com/adobe/brackets/issues/15213
Making a discord music bot in Discord.js but the play command doesn't works. The bot enters in the voice chat but don't say nothing.
const fs = require('fs'); bot.commands = new Discord.Collection(); const commandFiles = fs.readdirSync('./comandos/').filter(file => file.endsWith('.js')); for(const file of commandFiles) { const command = require(
./comandos/${file}
); bot.commands.set(command.name, command); }const token = 'TOKEN';
const PREFIX = '%';
var versão = '0.01';
const usedCommandRecently = new Set();
bot.on('ready', () => { console.log('Esse bot está online!'); bot.user.setPresence( { activity: { name: 'Assista e ganhe dinheiro de graça :D', type: "STREAMING", url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ&ab_channel=RickAstleyVEVO" } }); })
bot.on('guildMemberAdd', member => { const channel = member.guild.channels.cache.find(channel => channel.name === "boas-vindas"); if(!channel) return;
});
bot.on('message', async message => { if(!message.content.startsWith(PREFIX) || message.author.bot) return;
});
bot.login(token);`
module.exports = { name: 'play', description: "Toque uma música!", execute(message, args) { let estouPronto = false;
}` Any type of help would be apreciated.