Z0G0N
Z0G0N
DIAdiscord.js - Imagine an app
Created by Z0G0N on 2/6/2024 in #djs-questions
How to do both / commands and ! commands for 1 bot.
I want to create a both that can use both /battle and !battle, they should do the exact same thing. Here is what AI kind of gave me and also I did try to search this up I only seen things for Discord.py
client.on("messageCreate", async (message) => {
if (message.author.bot) return;

console.log(`testing: ${message.content}`);

if (message.content === "t" || message.content === "battle") {
const commandFile = client.commands.get("battle");
if (commandFile) {
await commandFile.execute(message, client);
} else {
await message.reply(`Couldn't find battle.js : ${commandFile}`);
}
}
});
client.on("messageCreate", async (message) => {
if (message.author.bot) return;

console.log(`testing: ${message.content}`);

if (message.content === "t" || message.content === "battle") {
const commandFile = client.commands.get("battle");
if (commandFile) {
await commandFile.execute(message, client);
} else {
await message.reply(`Couldn't find battle.js : ${commandFile}`);
}
}
});
^ Provided by the ChatGPT ai.
30 replies
DIAdiscord.js - Imagine an app
Created by Z0G0N on 2/3/2024 in #djs-questions
Collection Reaction not working.
No description
38 replies
DIAdiscord.js - Imagine an app
Created by Z0G0N on 9/14/2023 in #djs-questions
Mongo DB creating more than 1 collection when not being called.
3 replies