This is a simple ping command
const Discord = require("discord.js");
const client = new Discord.Client();
client.on("message", (message) => {
if (message.content === '!ping') {
message.channel.send("Pinging ...")
.then((msg) => {
msg.edit("Pong: " + (Date.now() - msg.createdTimestamp) + "ms")
});
}
})
client.login("TOKEN")
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…