Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F5365743
ping.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
432 B
Referenced Files
None
Subscribers
None
ping.js
View Options
import
{
SlashCommandBuilder
}
from
'discord.js'
;
export
default
{
builder
:
new
SlashCommandBuilder
().
setName
(
'ping'
).
setDescription
(
'show gateway latency'
),
run
:
async
i
=>
{
const
sent
=
await
i
.
reply
({
content
:
'pinging…'
,
withResponse
:
true
});
const
rtt
=
sent
.
resource
.
message
.
createdTimestamp
-
i
.
createdTimestamp
;
await
i
.
editReply
(
`pong — rtt
${
rtt
}
ms · ws
${
Math
.
round
(
i
.
client
.
ws
.
ping
)
}
ms`
);
}
};
File Metadata
Details
Attached
Mime Type
application/javascript
Expires
Sun, May 17, 5:50 AM (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
554558
Default Alt Text
ping.js (432 B)
Attached To
Mode
rANT Ant
Attached
Detach File
Event Timeline
Log In to Comment