How do you send a private message in discord.py to command user?

Issue

Please reference to the image below:

NQN bot sends an "only you can see this" message

I know how to send a private message DM to user… But I want the bot to send a message in the CHANNEL instead, yet make the message content see-able only by the command user. How do you send a message that says: "only you can see this".

Also, can this be done with embeds?

is it possible to send a private EMBED to user?

Solution

If you want to use like the above image then this is only possible in splash commands and buttons for now. But if you want to send user a embed in dm then you can and also you can also send this thing in embed.

If you want to use this in splash command you can do like this:

interaction.response.send_message("Text", ephemeral=True)

Answered By – AT Gaming

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published