play song in custom discord bot code example
Example 1: how make a music bot
go here https://github.com/WeebDev/Commando/tree/master/commands/music
Example 2: Discord.js Get A Bot To Join A Music Chanel
client.on("ready", () => {
const channel = client.channels.get("mychannelid");
if (!channel) return console.error("The channel does not exist!");
channel.join().then(connection => {
// Yay, it worked!
console.log("Successfully connected.");
}).catch(e => {
// Oh no, it errored! Let's log it to console :)
console.error(e);
});
});