This commit is contained in:
10
src/commands/prefix/ping/ping.ts
Normal file
10
src/commands/prefix/ping/ping.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { Message, Client } from "discord.js";
|
||||
|
||||
export const name = "ping";
|
||||
export const description = "Kiểm tra thời gian phản hồi của bot";
|
||||
|
||||
export async function execute(client: Client, message: Message, args: string[]) {
|
||||
const sent = await message.reply('Pong!');
|
||||
const latency = sent.createdTimestamp - message.createdTimestamp;
|
||||
await sent.edit(`Pong! \`${latency}ms\``);
|
||||
}
|
||||
Reference in New Issue
Block a user