mirror of
https://github.com/jaronpate/unicord.git
synced 2026-10-18 21:47:40 +00:00
Update website/src/components/CodeExample.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -130,7 +130,7 @@ client.chatCommands.register('ping', async (context: Context, args: any[]) => {
|
|||||||
// Send a message to the channel
|
// Send a message to the channel
|
||||||
const response = await context.reply(\`Pong!: got \${args.join(', ')}\`, true);
|
const response = await context.reply(\`Pong!: got \${args.join(', ')}\`, true);
|
||||||
// Calculate the time it took to send the message
|
// Calculate the time it took to send the message
|
||||||
const time = message.timestamp.getTime() - message.timestamp.getTime();
|
const time = Date.now() - message.timestamp.getTime();
|
||||||
// Edit the message to include the time
|
// Edit the message to include the time
|
||||||
await context.editMessage(response, \`Pong! Latency: \${time}ms\`);
|
await context.editMessage(response, \`Pong! Latency: \${time}ms\`);
|
||||||
});`;
|
});`;
|
||||||
|
|||||||
Reference in New Issue
Block a user