Andres.ᵈᵉᵛ
Andres.ᵈᵉᵛ
DIAdiscord.js - Imagine a boo! 👻
Created by Andres.ᵈᵉᵛ on 2/20/2024 in #djs-questions
Not just one but all the commands don't work
I don't understand that rule, I read it 40 times, I remind you that I am Spanish.
46 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Andres.ᵈᵉᵛ on 2/20/2024 in #djs-questions
Not just one but all the commands don't work
That index.js is from an AI since I don't know how to do index.js
46 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Andres.ᵈᵉᵛ on 2/20/2024 in #djs-questions
Not just one but all the commands don't work
Srry for ping
46 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Andres.ᵈᵉᵛ on 2/20/2024 in #djs-questions
Not just one but all the commands don't work
Do I apply this to my handler???
46 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Andres.ᵈᵉᵛ on 2/20/2024 in #djs-questions
Not just one but all the commands don't work
I don't understand why I should apply that to my handler?
46 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Andres.ᵈᵉᵛ on 2/20/2024 in #djs-questions
Not just one but all the commands don't work
in my handlre??
46 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Andres.ᵈᵉᵛ on 2/20/2024 in #djs-questions
Not just one but all the commands don't work
And how to fix that?
46 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Andres.ᵈᵉᵛ on 2/20/2024 in #djs-questions
Not just one but all the commands don't work
yeeeeee, let's see
46 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Andres.ᵈᵉᵛ on 2/20/2024 in #djs-questions
Not just one but all the commands don't work
And where is that (I'm a bit of a noob)
46 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Andres.ᵈᵉᵛ on 2/20/2024 in #djs-questions
Not just one but all the commands don't work
What project???
46 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Andres.ᵈᵉᵛ on 2/20/2024 in #djs-questions
Not just one but all the commands don't work
EXP OF MY COMMAND
const { MessageEmbed } = require('discord.js');
const { Color } = require('../../config.js');
const { promisify } = require('util');
const figlet = require('figlet');

const figletAsync = promisify(figlet);

module.exports = {
data: {
name: 'ascii',
aliases: [],
description: 'Ascii Art!',
usage: 'Ascii <Text>',
},
execute: async (interaction) => {
// Start
const Content = interaction.options.getString('text');

if (!Content) {
return interaction.reply({ content: '**¡Por favor! Ponme texto que no supere 20 argumentos.**', ephemeral: true });
}

if (Content.length > 20) {
return interaction.reply({ content: '**¡Por favor, hazlo más corto! | Límite: 20**', ephemeral: true });
}

const Result = await figletAsync(Content);

const embed = new MessageEmbed()
.setColor(Color)
.setDescription('
const { MessageEmbed } = require('discord.js');
const { Color } = require('../../config.js');
const { promisify } = require('util');
const figlet = require('figlet');

const figletAsync = promisify(figlet);

module.exports = {
data: {
name: 'ascii',
aliases: [],
description: 'Ascii Art!',
usage: 'Ascii <Text>',
},
execute: async (interaction) => {
// Start
const Content = interaction.options.getString('text');

if (!Content) {
return interaction.reply({ content: '**¡Por favor! Ponme texto que no supere 20 argumentos.**', ephemeral: true });
}

if (Content.length > 20) {
return interaction.reply({ content: '**¡Por favor, hazlo más corto! | Límite: 20**', ephemeral: true });
}

const Result = await figletAsync(Content);

const embed = new MessageEmbed()
.setColor(Color)
.setDescription('
' + Result + '
')
.setTimestamp();

interaction.reply({ embeds: [embed] });
// End
},
};
')
.setTimestamp();

interaction.reply({ embeds: [embed] });
// End
},
};
46 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Andres.ᵈᵉᵛ on 2/20/2024 in #djs-questions
Not just one but all the commands don't work
INDEX.JS
require("dotenv").config();
const { Client, GatewayIntentBits, Collection } = require('discord.js');
const fs = require('fs');

const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
],
});

client.commands = new Collection();
client.aliases = new Collection();

const prefix = ".";

// Manejador de comandos
fs.readdirSync('./commands').forEach(module => {
const commandFiles = fs.readdirSync(`./commands/${module}`).filter(file => file.endsWith('.js'));
for (const file of commandFiles) {
const command = require(`./commands/${module}/${file}`);
console.log(`[CMD] ${command.name} El comando ha sido cargado - ✅`);
client.commands.set(command.name, command);
if (command.aliases) {
command.aliases.forEach(alias => client.aliases.set(alias, command.name));
}
}
});

// Evento cuando el bot está listo
client.once('ready', () => {
console.log(`Bot listo como ${client.user.tag} - ✅`);
});

// Evento de mensaje
client.on('messageCreate', message => {
if (message.author.bot) return; // Ignorar mensajes de otros bots
if (!message.content.startsWith(prefix)) return; // Ignorar mensajes sin el prefijo

const args = message.content.slice(prefix.length).trim().split(/ +/);
const commandName = args.shift().toLowerCase();

const command = client.commands.get(commandName) || client.commands.get(client.aliases.get(commandName));

if (!command) return;

try {
command.execute(message, args);
} catch (error) {
console.error(error);
message.reply('Hubo un error al ejecutar el comando.').catch(console.error);
}
});

// Inicializando el proyecto
const token = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxU';
client.login(token);
require("dotenv").config();
const { Client, GatewayIntentBits, Collection } = require('discord.js');
const fs = require('fs');

const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
],
});

client.commands = new Collection();
client.aliases = new Collection();

const prefix = ".";

// Manejador de comandos
fs.readdirSync('./commands').forEach(module => {
const commandFiles = fs.readdirSync(`./commands/${module}`).filter(file => file.endsWith('.js'));
for (const file of commandFiles) {
const command = require(`./commands/${module}/${file}`);
console.log(`[CMD] ${command.name} El comando ha sido cargado - ✅`);
client.commands.set(command.name, command);
if (command.aliases) {
command.aliases.forEach(alias => client.aliases.set(alias, command.name));
}
}
});

// Evento cuando el bot está listo
client.once('ready', () => {
console.log(`Bot listo como ${client.user.tag} - ✅`);
});

// Evento de mensaje
client.on('messageCreate', message => {
if (message.author.bot) return; // Ignorar mensajes de otros bots
if (!message.content.startsWith(prefix)) return; // Ignorar mensajes sin el prefijo

const args = message.content.slice(prefix.length).trim().split(/ +/);
const commandName = args.shift().toLowerCase();

const command = client.commands.get(commandName) || client.commands.get(client.aliases.get(commandName));

if (!command) return;

try {
command.execute(message, args);
} catch (error) {
console.error(error);
message.reply('Hubo un error al ejecutar el comando.').catch(console.error);
}
});

// Inicializando el proyecto
const token = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxU';
client.login(token);
46 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Andres.ᵈᵉᵛ on 2/20/2024 in #djs-questions
Not just one but all the commands don't work
Do you want me to send you a sample of one of my commands?
46 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Andres.ᵈᵉᵛ on 2/20/2024 in #djs-questions
Not just one but all the commands don't work
But it's not just 1, it's in all commands
46 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Andres.ᵈᵉᵛ on 2/20/2024 in #djs-questions
Not just one but all the commands don't work
No description
46 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Andres.ᵈᵉᵛ on 2/20/2024 in #djs-questions
Not just one but all the commands don't work
Because I am Spanish and that's why I don't understand what the console.log thing is.
46 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Andres.ᵈᵉᵛ on 2/20/2024 in #djs-questions
Not just one but all the commands don't work
What is the console.log is it a file or is it the normal console.
46 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Andres.ᵈᵉᵛ on 2/20/2024 in #djs-questions
Not just one but all the commands don't work
Still not working
46 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Andres.ᵈᵉᵛ on 2/20/2024 in #djs-questions
Not just one but all the commands don't work
If no command works for me, is there any way to fix it?
46 replies