2021-04-09 11:23:13 +00:00
|
|
|
const AudioQueue=require('../../AudioQueue.js')
|
|
|
|
|
2021-04-06 23:36:35 +00:00
|
|
|
module.exports = function (bot, api) {
|
2021-04-05 14:09:36 +00:00
|
|
|
bot.on('ready', async () => {
|
|
|
|
console.log("Bot initialized and listening");
|
2021-04-06 23:36:35 +00:00
|
|
|
const guild = await bot.guilds.fetch(process.env.GUILD);
|
2021-04-05 14:09:36 +00:00
|
|
|
const channel = await bot.channels.fetch(process.env.CHANNEL);
|
|
|
|
await api.joinChannel(channel);
|
2021-04-09 11:23:13 +00:00
|
|
|
let conn=api.getConnectionForVoiceChannel(channel);
|
|
|
|
api.queue=new AudioQueue(conn);
|
2021-04-10 21:45:02 +00:00
|
|
|
api.speak(channel, `Running`);
|
2021-04-06 23:36:35 +00:00
|
|
|
})
|
2021-04-05 14:09:36 +00:00
|
|
|
}
|