Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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);
  });
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Get #A #Bot #To #Join #A #Music #Chanel
ADD COMMENT
Topic
Name
1+5 =