Files
tardis-bot/modules/welcomer/index.js

14 lines
567 B
JavaScript
Raw Normal View History

2021-04-09 13:23:13 +02:00
const AudioQueue=require('../../AudioQueue.js')
2021-04-07 01:36:35 +02:00
module.exports = function (bot, api) {
2021-04-05 16:09:36 +02:00
bot.on('ready', async () => {
console.log("Bot initialized and listening");
2021-04-07 01:36:35 +02:00
const guild = await bot.guilds.fetch(process.env.GUILD);
2021-04-05 16:09:36 +02:00
const channel = await bot.channels.fetch(process.env.CHANNEL);
await api.joinChannel(channel);
2021-04-09 13:23:13 +02:00
let conn=api.getConnectionForVoiceChannel(channel);
api.queue=new AudioQueue(conn);
2021-07-12 20:00:22 +02:00
api.queue.add(__dirname + "/../../sysstart.wav");
api.speak(channel, api.strings.WELCOME);
2021-04-07 01:36:35 +02:00
})
2021-04-05 16:09:36 +02:00
}