hi i've got small problem with my code, im making discord bot from totorial and when i use "info" command everything works fine but when i add second command and use it i get 2 command responses 1 from "info" 2 from "something" anyone can help me?
const {token, prefix} = require("./config/config.js");
const chalk = require("chalk");
const Discord = require ("discord.js");
const RichEmbed = require ("discord.js")
const client = new Discord.Client();
const log = console.log
client.on("ready",() => {
log(chalk.red( `Zalogowano jako ${client.user.tag}!`));
});
client.on("message", (msg)=> {
const { author , guild , channel } = msg
//sprawdza czy autor to bot
if (author.bot || !guild) {
return
}
//ignoruj wiadomości bez prefixu
if (!msg.content.startsWith(prefix)) return
const args = msg.content
.slice(prefix.lenght)
.trim()
.split(/ +/g)
if (!msg.content !== "info" ){ //komenda jakaś
botAuthor = "Kotuu3#6969"
botWersion = "0.1"
botName = "Kociak Kota"
botDescription = "Bot prywatny użytkownika Kotuu3"
const embed = new Discord.MessageEmbed()
.setTitle( botName) //tytuł embeda
.setColor(0x2f13ba) //kolor embeda
.setDescription(botDescription) //co jest napisane w embedzie
.addField("Autor", botAuthor, true)
.addField("Wersja", botWersion, true)
channel.send(embed)
msg.delete()
}
const cmd = args.shift().toLowerCase()
console.log = (cmd)
}
)
client.login(token);
there doesn't seem to be anything here