Functioning audio bot
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
//Config
|
||||
import { getTOKEN, getGuildID, getApplicationID } from './utilities/configHandler.js';
|
||||
// Commands
|
||||
import ping from './controllers/ping.js';
|
||||
import { join, leave } from './controllers/voiceController.js';
|
||||
import ping from './commands/ping.js';
|
||||
import join from './commands/join.js';
|
||||
import leave from './commands/leave.js';
|
||||
// Debug
|
||||
import Debug from 'debug';
|
||||
const debug = Debug("bot:app");
|
||||
import debugBuilder from "./utilities/debugBuilder.js";
|
||||
const log = new debugBuilder("bot", "app");
|
||||
// Modules
|
||||
import { Client, GatewayIntentBits } from 'discord.js';
|
||||
// Utilities
|
||||
@@ -23,15 +24,13 @@ const client = new Client({
|
||||
|
||||
// When the client is connected and ready
|
||||
client.on('ready', () =>{
|
||||
debug(`${client.user.tag} is ready`)
|
||||
console.log(`${client.user.tag} is ready`)
|
||||
log.INFO(`${client.user.tag} is ready`)
|
||||
});
|
||||
|
||||
/*
|
||||
* Saved For later
|
||||
client.on('messageCreate', (message) => {
|
||||
debug(`Message Sent by: ${message.author.tag}\n\t'${message.content}'`);
|
||||
console.log(`Message Sent by: ${message.author.tag}\n\t'${message.content}'`);
|
||||
log.DEBUG(`Message Sent by: ${message.author.tag}\n\t'${message.content}'`);
|
||||
});
|
||||
*/
|
||||
|
||||
@@ -50,8 +49,8 @@ client.on('interactionCreate', (interaction) => {
|
||||
break;
|
||||
default:
|
||||
interaction.reply({ content: 'Command not found, try one that exists', fetchReply: true })
|
||||
.then((message) => console.log(`Reply sent with content ${message.content}`))
|
||||
.catch(console.error);
|
||||
.then((message) => log.DEBUG(`Reply sent with content ${message.content}`))
|
||||
.catch((err) => log.ERROR(err));
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user