-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Certain message types are not deletable #6551
Comments
This is intended behavior, and documented in the "Deletable" field on the docs. |
Ok |
We should consider changing this behavior. |
The behavior has been changed and internally I've made it so that when a new message type is made, it is implicitly deletable (this used to have to be an explicit thing devs would set.) Now, this has been inverted to a set of "undeletable" message types, which I'm reproducing below (with code comments and all so people understand the rationale. UNDELETABLE = {
# These deal with GDM recipients being added/removed,
# we should not allow these to be deleted, since they
# deal joining/leaving a GDM, which should arguably have
# an audit trail.
_.RECIPIENT_ADD,
_.RECIPIENT_REMOVE,
# This deals with calls, and should not be deletable, as it
# would potentially orphan the call (since the starter message,
# is what triggers being able to join said call.)
_.CALL,
# These deal with changing a GDM name/icon, and arguably should have
# an audit trail, and thus shouldn not be deletable.
_.CHANNEL_NAME_CHANGE,
_.CHANNEL_ICON_CHANGE,
# This is the first message in a thread, and it's a pointer to a normal message.
# As such, this message should not be deletable.
_.THREAD_STARTER_MESSAGE,
} As such, this means that the following message types are now allowed to be deleted:
Additionally, the following yet-to-be documented message types also are now able to be deleted:
"User was removed from thread" notification unfortunately re-uses the |
I would like to note that |
Description
Some message types are not deletable.
This includes:
I haven't gone through and checked all of them, but these are the ones that I commonly run into.
Steps to Reproduce
Trigger an automod alert, try to delete the message it created.
Expected Behavior
You should be able to delete the automod alert message like any other message type. (Message pinned, user joined, etc.)
Current Behavior
The API disallows it.
Screenshots/Videos
No response
Client and System Information
n/a -- discord.js v14.14.1
The text was updated successfully, but these errors were encountered: