I'm working on discord bot and making ping command as test, but it loops because it responds to itself. However, if I put message.author.bot === false in every command my code will be a mess!
client.on("message", message => {
if(message.content === "ping" && message.author.bot === false){
message.channel.send("pong")
} else if(message.content === "pong" && message.author.bot === false){
message.channel.send("ping")
}
})
Is there a better way to solve this?