File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed
Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ 'use strict' ;
2+
3+ const BitField = require ( './BitField' ) ;
4+
5+ /**
6+ * Data structure that makes it easy to interact with an {@link GuildMember#flags} bitfield.
7+ * @extends {BitField }
8+ */
9+ class AttachmentFlags extends BitField { }
10+
11+ /**
12+ * @name AttachmentFlags
13+ * @kind constructor
14+ * @memberof AttachmentFlags
15+ * @param {BitFieldResolvable } [bits=0] Bit(s) to read from
16+ */
17+
18+ /**
19+ * Numeric guild member flags. All available properties:
20+ * * `IS_REMIX`
21+ * @type {Object }
22+ * @see {@link https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure-attachment-flags }
23+ */
24+ AttachmentFlags . FLAGS = {
25+ IS_REMIX : 1 << 2 ,
26+ } ;
27+
28+ /**
29+ * Data that can be resolved to give a guild attachment bitfield. This can be:
30+ * * A string (see {@link AttachmentFlags.FLAGS})
31+ * * A attachment flag
32+ * * An instance of AttachmentFlags
33+ * * An Array of AttachmentFlagsResolvable
34+ * @typedef {string|number|AttachmentFlags|AttachmentFlagsResolvable[] } AttachmentFlagsResolvable
35+ */
36+
37+ module . exports = AttachmentFlags ;
Original file line number Diff line number Diff line change @@ -1715,6 +1715,7 @@ export class MessageAttachment {
17151715 public description : string | null ;
17161716 public duration : number | null ;
17171717 public ephemeral : boolean ;
1718+ public flags : Readonly < AttachmentFlags > ;
17181719 public height : number | null ;
17191720 public id : Snowflake ;
17201721 public name : string | null ;
@@ -1731,6 +1732,14 @@ export class MessageAttachment {
17311732 public toJSON ( ) : unknown ;
17321733}
17331734
1735+ export class AttachmentFlags extends BitField < AttachmentFlagsString > {
1736+ public static FLAGS : Record < AttachmentFlagsString , number > ;
1737+ public static resolve ( bit ?: BitFieldResolvable < AttachmentFlagsString , number > ) : number ;
1738+ }
1739+
1740+ export type AttachmentFlagsString =
1741+ | 'IS_REMIX' ;
1742+
17341743export class MessageButton extends BaseMessageComponent {
17351744 public constructor ( data ?: MessageButton | MessageButtonOptions | APIButtonComponent ) ;
17361745 public customId : string | null ;
You can’t perform that action at this time.
0 commit comments