-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Description
A normal Discord user using the app, when trying to edit a message without content, receives the message "Do you want to delete your message?", which, upon confirmation, simply deletes the message, while the bot (and the bot API) can edit the message to an empty one.
Steps to Reproduce
Here example for JDA library: discord-jda/JDA#2901
copied instructions for JDA library from mentioned issue: to get an empty message, just create a MessageEditBuilder
from the original that has some content, then use .setContent("")
and send the changes using message.editMessage(messageEditBuilder.build())
. Discord API will not return any error
Expected Behavior
A Discord bot cannot edit an empty message. In the JDA library, if you try to create a message editing object from such an empty message, you receive an error from the library, which I wrote about here in an issue: discord-jda/JDA#2901 It's worth noting that this is the second largest library for writing Discord bots, sponsored by Discord itself. I don't know how it works in the Discord.js library because I don't use it.
Current Behavior
You can edit a message as a Discord bot by setting content to "" (none, empty), even if the message contains nothing but content.
The message is edited to a blank state (only the text "(edited)" remains), and then it can't be edited using the most popular Discord bot libraries. Even though a regular user can't send such a message from the app.
Screenshots/Videos
