How to Send Ephemeral Messages in Discord.js

Make a discord.js bot send ephemeral messages when a user uses a slash command, i have tried using interation.editReply({content: "etc-etc", ephemeral:true}); , and anything that seemed reasonable but it seemed unsuccessful, please send an example how i would implement ephemeral message!

Edit:

My Slash command Help file:

const { Message, Client } = require("discord.js");

module.exports = {
    name: "help",
    description: "Sends web page url for all commands",
    run: async (client, interaction) => {

        await interaction.deferReply({ephemeral: true});

        interaction.editReply({
            embeds: [
                {
                    title: `${client.user.username}'s Help Page`,
                    description: `https://help.tcb.jayeshrocks.xyz`,
                    color: "RANDOM"
                }
            ]
        })
    }
};

Now I am recieving interaction already replied errors



Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation