#Sending messages with Interactions

1 messages · Page 1 of 1 (latest)

old spade

I have an unexpected result when sending a message with Intentions.

async execute(interaction) {
    await interaction.channel
      .send(
        `${interaction.user.username} your ping is: ${interaction.client.ws.ping}ms`
      )
      .then(msg => {
        msg.edit(
          `${interaction.user.username} your ping is ${
            interaction.client.ws.ping
          }ms and your latency is: ${
            msg.createdTimestamp - interaction.createdTimestamp
          }ms`
        );
      });
  },

The command will still act as if it is replying, and processes an Ephereal state where only I can see the reply as shown in the images attached. This is unexpected as ultimately, it sends the message, and also edits the sent message to give the correct output, Please see image attached.