Update bot to new discord API and add simple chatgpt module

This commit is contained in:
2023-03-21 13:35:28 +01:00
parent 136173f4de
commit b6008e0ad3
11 changed files with 6383 additions and 4183 deletions

View File

@@ -1,14 +1,14 @@
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);
})
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);
api.queue.add(__dirname + "/../../sysstart.wav");
api.speak(channel, api.strings.WELCOME);
})
}