Okay, my server will have two bots on it, A music bot and this one, My music bot only responds to commands in a certain text chat to prevent my users from requesting songs in different chats.
Now the command I am trying to make is when the bot gets a command lets say !favsong I want it to send a message to a specific channel regardless of the one it is in.
I currently have the commands stacked to when it sees !favsong it has two jobs: respond to the current channel it is in, and send a message to the request channel to trigger my music bot to play that url of the song in the response.
First response:
}
switch(cmd) {
case ‘favsong’:
bot.sendMessage({
to: channelID,
message: ‘Playing Favorite Song’
});
break;
Second Response:
}
switch(cmd) {
case ‘favsong’:
bot.sendMessage({
to: channelID,
message: ‘!play https://www.youtube.com/watch?v=QIjKijhv1OU’
});
break;