ping embed
This commit is contained in:
parent
9285063cf9
commit
0c255417cc
|
@ -1,4 +1,8 @@
|
||||||
import { SlashCommandBuilder, ChatInputCommandInteraction } from "discord.js";
|
import {
|
||||||
|
SlashCommandBuilder,
|
||||||
|
ChatInputCommandInteraction,
|
||||||
|
EmbedBuilder,
|
||||||
|
} from "discord.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data: new SlashCommandBuilder()
|
data: new SlashCommandBuilder()
|
||||||
|
@ -11,12 +15,21 @@ export default {
|
||||||
fetchReply: true,
|
fetchReply: true,
|
||||||
ephemeral: true,
|
ephemeral: true,
|
||||||
});
|
});
|
||||||
interaction.editReply({
|
const embed = new EmbedBuilder()
|
||||||
content: `**PONG🏓**\n\`\`\`\n
|
.setColor(0x0099ff)
|
||||||
Websocket heartbeat: ${interaction.client.ws.ping}ms.
|
.setTitle("***PONG🏓***")
|
||||||
\nRoundtrip latency: ${
|
.addFields(
|
||||||
defer.createdTimestamp - interaction.createdTimestamp
|
{
|
||||||
}ms\nRunner: ${process.env.RUNNER_NAME}\n\`\`\``,
|
name: "Websocket heartbeat",
|
||||||
});
|
value: `${interaction.client.ws.ping}ms`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Roundtrip latency",
|
||||||
|
value: `${defer.createdTimestamp - interaction.createdTimestamp}ms`,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.setFooter({ text: `Bot runner: ${process.env.RUNNER_NAME}` });
|
||||||
|
|
||||||
|
interaction.editReply({ embeds: [embed] });
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue