Skip to content

Commit

Permalink
typings(Attachment): make attachment private (#8982)
Browse files Browse the repository at this point in the history
* typings(Attachment): remove attachment property

* remove from structures

* Revert "remove from structures"

This reverts commit 88acb8d.

* typings(attachment): make attachment private

---------

Co-authored-by: space <spaceeec@yahoo.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Feb 17, 2023
1 parent 76b2116 commit da23cd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/discord.js/typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1988,7 +1988,7 @@ export class AttachmentBuilder {

export class Attachment {
private constructor(data: APIAttachment);
public attachment: BufferResolvable | Stream;
private attachment: BufferResolvable | Stream;
public contentType: string | null;
public description: string | null;
public ephemeral: boolean;
Expand Down

4 comments on commit da23cd5

@vercel
Copy link

@vercel vercel bot commented on da23cd5 Feb 17, 2023

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on da23cd5 Feb 17, 2023

Choose a reason for hiding this comment

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

@cloudytraveller
Copy link

@cloudytraveller cloudytraveller commented on da23cd5 Apr 8, 2023

Choose a reason for hiding this comment

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

Why was this change made? Making attachment private has broken everything related to attachment downloads in my bots code.

@Jiralite
Copy link
Member

Choose a reason for hiding this comment

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

If you read the linked pull request, you would find out. This is not documented, so you were relying on undocumented behaviour.

Please sign in to comment.