#5 replace all console.logs with debugger
All checks were successful
DRB Tests / drb_mocha_tests (pull_request) Successful in 32s

This commit is contained in:
Logan Cusano
2024-05-25 23:52:18 -04:00
parent 81a215f048
commit 2ab5a181bd
22 changed files with 192 additions and 133 deletions

View File

@@ -1,14 +1,16 @@
import { DebugBuilder } from "../../modules/debugger.mjs";
const log = new DebugBuilder("server", "discordBot.events.interactionCreate");
import { Events } from 'discord.js';
export const name = Events.InteractionCreate;
export async function execute(nodeIo, interaction) {
const command = interaction.client.commands.get(interaction.commandName);
console.log("Interaction created for command: ", command);
log.INFO("Interaction created for command: ", command);
// Execute autocomplete if the user is checking autocomplete
if (interaction.isAutocomplete()) {
console.log("Running autocomplete for command: ", command.data.name);
log.INFO("Running autocomplete for command: ", command.data.name);
return await command.autocomplete(nodeIo, interaction);
}
@@ -20,7 +22,7 @@ export async function execute(nodeIo, interaction) {
return;
}
console.log(`${interaction.member.user} is running '${interaction.commandName}'`);
log.INFO(`${interaction.member.user} is running '${interaction.commandName}'`);
// Defer the initial reply if the command has the parameter set
if (command.deferInitialReply) {