Skip to content
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

feat(Message): allow removing attachments #5557

Merged
merged 2 commits into from
May 10, 2021
Merged

feat(Message): allow removing attachments #5557

merged 2 commits into from
May 10, 2021

Conversation

vaporoxx
Copy link
Contributor

@vaporoxx vaporoxx commented Apr 22, 2021

Please describe the changes this PR makes and why it should be merged:

This adds support for removing attachments from a message.

Status and versioning classification:

  • Code changes have been tested against the Discord API
  • I know how to update typings and have done so
  • This PR changes the library's interface (methods or parameters added)

@ThaTiemsz
Copy link
Contributor

It's also possible to remove a single attachment from messages. This can be done by editing the message with as payload the array of message attachments with the one(s) that you want removed left out.

image

@monbrey
Copy link
Member

monbrey commented Apr 27, 2021

If individual attachments can be edited out, I'm not sure this needs to be a separate Message#removeAttachments method, or boolean option.

Shouldn't MessageEditOptions just have support for an attachments array, in the same way it would embeds?

Copy link
Member

@vladfrangu vladfrangu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What @monbrey said above

@iCrawl iCrawl merged commit ca9e5a0 into discordjs:master May 10, 2021
@iCrawl

This comment has been minimized.

@vaporoxx vaporoxx deleted the feat-remove-attachments branch May 10, 2021 13:55
@iCrawl iCrawl added this to the Version 13 milestone Jun 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants