Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send spontaneous ephemeral discord message

Slash commands are a great tool to have users type command without spamming. Replying with ephemeral message is great too. I was wondering if there is a way to send an ephemeral message to a user without using an Interaction. I want to initiate interaction not only via slash commands nor buttons, but with reactions, specific content in messages, member nickname updates etc... And then, once the message with buttons is sent, I can just reply to buttons' interaction. I know I can use the old way (directly dm the user), but it would be more convenient to have an ephemeral message directly in the same channel.

The only way I have found so far is having the user typing a command (or making any interaction that will act as an anchor point). And the later, when an ephemeral message is needed, make a follow up message from that interaction. The downside of this solution is the user has to make an interaction in all channels that would require spontaneous ephemeral message. And also, users have to do an interaction in the first place, which isn't very convenient when you want to deal with new users.

like image 940
Mister Aqua Avatar asked Jul 08 '21 09:07

Mister Aqua


People also ask

What is an ephemeral message Discord?

An "Ephemeral Message" is a message sent by Clyde and other Discord bots. It's a message that only you can see. These messages disappear when you dismiss them, wait long enough, or restart Discord.

Can you edit ephemeral messages Discord?

As of today, ephemeral messages can only be edited if they were created as an interaction response. This can be done via Edit Original Interaction Response endpoint.

What is ephemeral response?

What is an ephemeral response? Basically, only the user who executed the command can see the result of it, this is pretty simple to implement.

How do you use slash commands in Discord?

WHAT ARE SLASH COMMANDS? Slash Commands are the new, exciting way to build and interact with bots on Discord. With Slash Commands, all you have to do is type / and you're ready to use your favorite bot.

What are ephemeral messages on Discord?

Ephemeral Messages are a new way for Discord bots to send you a private message without having to send you a DM. You may have received this kind of message before from Clyde, and now bots can send them, too! Q: What is this kind of message?

Why can't I get an ephemeral message from a bot?

Bots can only send you this kind of message when you use a Slash Command. If the bot you're using hasn't implemented Slash Commands, they'll have to DM you instead. Q: Help! The message disappeared! Ephemeral Messages are designed to not stick around forever.

What are ephemeral followup messages and how do they work?

Ephemeral followup messages are messages your bot can create when it handles an interaction like a slash command, button press, or context menu selection. They are only visible to the person who triggered the interaction and can be dismissed with a click, so they avoid cluttering your channels.

What are the downsides of an ephemeral messaging solution?

The downside of this solution is the user has to make an interaction in all channels that would require spontaneous ephemeral message. And also, users have to do an interaction in the first place, which isn't very convenient when you want to deal with new users. I don’t believe this is possible yet.


Video Answer


1 Answers

The Ephemeral Messages FAQ and Developer Documentation on Interaction Responses show that only interaction responses currently support ephemeral messages.

There will not be any support for uninvoked ephemeral messages, according to Mason, a Discord engineer (screenshot), as it would open quite a lot of abuse possibilities.

As AEnterprise said in the Discord Developers server: "imagine bots being able to spam advertisements only visible to specific members, that are not stored [on Discord's servers] so very little to no proof for Trust & Safety to even look up".

like image 175
Splatterxl Avatar answered Dec 03 '22 02:12

Splatterxl