Zer0 🥀
Zer0 🥀
DIAdiscord.js - Imagine an app
Created by Zer0 🥀 on 11/12/2023 in #djs-questions
My commands not uploading
thanks for your support
34 replies
DIAdiscord.js - Imagine an app
Created by Zer0 🥀 on 11/12/2023 in #djs-questions
My commands not uploading
okay
34 replies
DIAdiscord.js - Imagine an app
Created by Zer0 🥀 on 11/12/2023 in #djs-questions
My commands not uploading
but why does this happen?
34 replies
DIAdiscord.js - Imagine an app
Created by Zer0 🥀 on 11/12/2023 in #djs-questions
My commands not uploading
seemed restarting the client worked
34 replies
DIAdiscord.js - Imagine an app
Created by Zer0 🥀 on 11/12/2023 in #djs-questions
My commands not uploading
I added a command and restarted my bot
34 replies
DIAdiscord.js - Imagine an app
Created by Zer0 🥀 on 11/12/2023 in #djs-questions
My commands not uploading
my client not
34 replies
DIAdiscord.js - Imagine an app
Created by Zer0 🥀 on 11/12/2023 in #djs-questions
My commands not uploading
like before once I restart bot commands where updated the description and all that but now not
34 replies
DIAdiscord.js - Imagine an app
Created by Zer0 🥀 on 11/12/2023 in #djs-questions
My commands not uploading
why?
34 replies
DIAdiscord.js - Imagine an app
Created by Zer0 🥀 on 11/12/2023 in #djs-questions
My commands not uploading
now not
34 replies
DIAdiscord.js - Imagine an app
Created by Zer0 🥀 on 11/12/2023 in #djs-questions
My commands not uploading
But before worked
34 replies
DIAdiscord.js - Imagine an app
Created by Zer0 🥀 on 11/12/2023 in #djs-questions
My commands not uploading
why?
34 replies
DIAdiscord.js - Imagine an app
Created by Zer0 🥀 on 11/12/2023 in #djs-questions
My commands not uploading
Index js file
const { loadCommands } = require("./Handlers/cargarComandos");
client.commands = new Collection();

client.login(token).then(() => {
loadEvents(client);
loadCommands(client);
});
const { loadCommands } = require("./Handlers/cargarComandos");
client.commands = new Collection();

client.login(token).then(() => {
loadEvents(client);
loadCommands(client);
});
34 replies
DIAdiscord.js - Imagine an app
Created by Zer0 🥀 on 11/12/2023 in #djs-questions
My commands not uploading
async function loadCommands(client) {
const ascii = require("ascii-table");
const fs = require("fs");
var colors = require('colors');
const table = new ascii().setHeading("Comandos", "Estado");

let commandsArray = [];

const commandsFolder = fs.readdirSync("./comandos");
for (const folder of commandsFolder) {
const commandFiles = fs
.readdirSync(`./comandos/${folder}`)
.filter((file) => file.endsWith(".js"));

for (const file of commandFiles) {
const commandFile = require(`../comandos/${folder}/${file}`);

const properties = { folder, ...commandFile };
client.commands.set(commandFile.data.name, commandFile);

commandsArray.push(commandFile.data.toJSON());
console.log(`[ KIRI-COMANDOS ]`.underline.cyan + " --- Cargando ".cyan + ` ${commandFile.data.name}`.cyan);
await new Promise(resolve => setTimeout(resolve, 10)); // wait for 2 seconds
table.addRow(file, "cargado");
continue;
}
}

client.application.commands.set(commandsArray);
}

module.exports = { loadCommands };
async function loadCommands(client) {
const ascii = require("ascii-table");
const fs = require("fs");
var colors = require('colors');
const table = new ascii().setHeading("Comandos", "Estado");

let commandsArray = [];

const commandsFolder = fs.readdirSync("./comandos");
for (const folder of commandsFolder) {
const commandFiles = fs
.readdirSync(`./comandos/${folder}`)
.filter((file) => file.endsWith(".js"));

for (const file of commandFiles) {
const commandFile = require(`../comandos/${folder}/${file}`);

const properties = { folder, ...commandFile };
client.commands.set(commandFile.data.name, commandFile);

commandsArray.push(commandFile.data.toJSON());
console.log(`[ KIRI-COMANDOS ]`.underline.cyan + " --- Cargando ".cyan + ` ${commandFile.data.name}`.cyan);
await new Promise(resolve => setTimeout(resolve, 10)); // wait for 2 seconds
table.addRow(file, "cargado");
continue;
}
}

client.application.commands.set(commandsArray);
}

module.exports = { loadCommands };
34 replies
DIAdiscord.js - Imagine an app
Created by Zer0 🥀 on 11/12/2023 in #djs-questions
My commands not uploading
there is no error
34 replies
DIAdiscord.js - Imagine an app
Created by Zer0 🥀 on 11/12/2023 in #djs-questions
My commands not uploading
idk what I can provide
34 replies
DIAdiscord.js - Imagine an app
Created by Zer0 🥀 on 11/12/2023 in #djs-questions
My commands not uploading
just no updating
34 replies
DIAdiscord.js - Imagine an app
Created by Zer0 🥀 on 11/12/2023 in #djs-questions
My commands not uploading
no console error
34 replies
DIAdiscord.js - Imagine an app
Created by Zer0 🥀 on 11/12/2023 in #djs-questions
My commands not uploading
14.13.0
34 replies