My code for this is:
const { SlashCommandBuilder, EmbedBuilder } = require(“discord.js”);
data: new SlashCommandBuilder()
.setName('ping')
.setDescription('Check Cord connectivity'),
async execute(interaction, client) {
const embed = new EmbedBuilder()
.setTitle(`**Cord current ping status:**`)
.setColor(0x8db2c8)
.setThumbnail(client.user.displayAvatarURL())
.setTimestamp(Date.now())
.addFields([
{
name: `**API Latency:**`,
value: "```${client.ws.ping}```",
inline: true
},
{
name: `**Client Ping:**`,
value: "```${message.createdTimestamp - interaction.createdTimestamp}```",
inline: true
},
]);
await interaction.reply({
embeds:
})
}
}
I have tried removing ,
from both the fields but it seems not to work. I’m not too sure if it will work in an embed or not and I can’t really find anything online about it. The output that I got was in the photo attached.
embed
New contributor
Owen Reboul is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.