2023-03-21 12:35:28 +00:00
|
|
|
const AudioQueue=require('../../AudioQueue.js')
|
|
|
|
|
|
|
|
module.exports = function (bot, api) {
|
|
|
|
bot.on('ready', async () => {
|
|
|
|
console.log("Bot initialized and listening");
|
|
|
|
const guild = await bot.guilds.fetch(process.env.GUILD);
|
|
|
|
const channel = await bot.channels.fetch(process.env.CHANNEL);
|
|
|
|
await api.joinChannel(channel);
|
|
|
|
let conn=api.getConnectionForVoiceChannel(channel);
|
2023-03-21 18:54:59 +00:00
|
|
|
if (!api.queue) api.queue=new AudioQueue(conn, api);
|
2023-03-21 12:35:28 +00:00
|
|
|
api.queue.add(__dirname + "/../../sysstart.wav");
|
|
|
|
api.speak(channel, api.strings.WELCOME);
|
|
|
|
})
|
2021-04-05 14:09:36 +00:00
|
|
|
}
|