Bot not responding to prefix cmds
Hi to all!
I have the following in my
The bot isn't responding when I do
I will attach my ping.js below as msg
I have the following in my
./events/messageCreate.js./events/messageCreate.jsconst { Events } = require('discord.js');
module.exports = {
name: Events.MessageCreate,
execute(message) {
const prefix = "+";
console.log(")")
if (!message.content.startsWith(prefix) || message.author.bot) return;
const args = message.content.slice(prefix.length).trim().split(/ +/);
console.log("/")
const commandName = args.shift().toLowerCase();
const command = message.client.commands.get(commandName) || message.client.commands.find(cmd => cmd.aliases && cmd.aliases.includes(commandName));
console.log("o")
if (!command) return;
// Check permissions, cooldowns, etc.
try {
command.execute(message, args);
} catch (error) {
console.error(error);
message.reply('There was an error trying to execute that command!');
}
},
};const { Events } = require('discord.js');
module.exports = {
name: Events.MessageCreate,
execute(message) {
const prefix = "+";
console.log(")")
if (!message.content.startsWith(prefix) || message.author.bot) return;
const args = message.content.slice(prefix.length).trim().split(/ +/);
console.log("/")
const commandName = args.shift().toLowerCase();
const command = message.client.commands.get(commandName) || message.client.commands.find(cmd => cmd.aliases && cmd.aliases.includes(commandName));
console.log("o")
if (!command) return;
// Check permissions, cooldowns, etc.
try {
command.execute(message, args);
} catch (error) {
console.error(error);
message.reply('There was an error trying to execute that command!');
}
},
};The bot isn't responding when I do
+ping+pingI will attach my ping.js below as msg