#followUp
1 messages · Page 1 of 1 (latest)
could you send your code for this?
thats rather odd
when did this start happening
like after an update or just randomly
const { client, CommandInteraction, MessageEmbed } = require("discord.js");
const db = require('quick.db')
module.exports = {
name: "ping",
description: "Returns Latency and API Ping.",
type: 'CHAT_INPUT',
timeout: 5000,
run: async (client, interaction, args) => {
const Blacklisted = db.fetch(`blacklistedUsers_${interaction.user.id}`)
if (Blacklisted === true) return;
interaction.followUp({ content: `Calculating ping...` }).then((resultMessage) => {
const ping = resultMessage.createdTimestamp - interaction.createdTimestamp
const embed = new MessageEmbed()
.setTitle("Pong!")
.setAuthor(`${interaction.user.username}`, interaction.user.displayAvatarURL())
.setDescription(` Bot Latency is ${ping} ms\n API Latency is ${Math.round(client.ws.ping)} ms`
)
.setFooter(interaction.guild.name)
.setColor('#2F3136');
resultMessage.edit({
content: `\u200B`,
embeds: [embed]
})
})
},
};
for example ping command
theres also deprecated setAuthor and SetFooter but it literally doesnt log it in console
that is odd
very
could you add a console log inside the .then() handler
to check if the thing is even reaching that
related to followUp
i dont think this will fix it but
can you use async/await syntax
like do
const resultMessage = await interaction.followUp({ content: 'Calculating ping...' })
console.log("finished")
then move the code from the .then to after this line
@devout estuary @dusk cosmos
you need to provide fetchReply: true in the options
<Interaction>.followUp({ content: 'blah blah', fetchReply: true })
then it does return the message
oh yeah my bad sorry
i misread the second part in MessagePayload or InteractionReplyOptions
.