Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const { SlashCommandBuilder } = require('discord.js');
- const { EmbedBuilder } = require('discord.js');
- module.exports = {
- data: new SlashCommandBuilder()
- .setName('ping')
- .setDescription('Replies with pong!'),
- async execute(interaction) {
- let latency = Date.now() - interaction.createdTimestamp;
- const latencyEmbed = new EmbedBuilder()
- .setColor(0x087099)
- .setTitle('Gawther\'s Latency')
- .setAuthor({ name: interaction.user.tag, iconURL: interaction.user.avatar })
- .setDescription(`Gawthers's Latency Is ${latency}ms.`)
- .setThumbnail(interaction.client.user.avatar)
- .setTimestamp()
- .setFooter({ text: 'If the latency is above 50ms, then please contact support' });
- channel.send({ embeds: [exampleEmbed] });
- await interaction.reply({
- embeds: [latencyEmbed],
- ephemeral: true
- });
- },
- };
Advertisement
Add Comment
Please, Sign In to add comment