14 lines
567 B
JavaScript
14 lines
567 B
JavaScript
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);
|
|
api.queue=new AudioQueue(conn);
|
|
api.queue.add(__dirname + "/../../sysstart.wav");
|
|
api.speak(channel, api.strings.WELCOME);
|
|
})
|
|
} |