I'm having trouble creating commands for my bot on discord in javascript

Viewed 29

I'm creating a bot for discord in javascript. I made a command for when a user sends "-ping" the bot informs the user's ping in the chat, but the bot is not responding to the command. This is my code:

if(comando === "ping") {
    const m = await message.channel.send("Ping?");
    m.edit(`Pong! A Latência é ${m.createdTimestamp - message.createdTimestamp}ms. A Latência da API é ${Math.round(client.ping)}ms`);
}
0 Answers
Related