Skip to content
This repository was archived by the owner on Oct 5, 2025. It is now read-only.

Commit 9d4454e

Browse files
aolsen07Jiralite
andauthored
fix(faq): update faq/ping snippet to use withResponse (#1628)
Co-authored-by: Jiralite <[email protected]>
1 parent a115a3d commit 9d4454e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

guide/popular-topics/faq.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,8 @@ If you're using [sharding](/sharding/), a specific shard's heartbeat can be foun
319319
The second, **Roundtrip Latency**, describes the amount of time a full API roundtrip (from the creation of the command message to the creation of the response message) takes. You then edit the response to the respective value to avoid needing to send yet another message:
320320
321321
```js
322-
const sent = await interaction.reply({ content: 'Pinging...' });
323-
interaction.editReply(`Roundtrip latency: ${sent.createdTimestamp - interaction.createdTimestamp}ms`);
322+
const sent = await interaction.reply({ content: 'Pinging...', withResponse: true });
323+
interaction.editReply(`Roundtrip latency: ${sent.resource.message.createdTimestamp - interaction.createdTimestamp}ms`);
324324
```
325325
326326
### Why do some emojis behave weirdly?

0 commit comments

Comments
 (0)