discord.js 15.0.0-dev.1748347538-2c35084ec → 15.0.0-dev.1748650424-ef2c1bfa7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "discord.js",
4
- "version": "15.0.0-dev.1748347538-2c35084ec",
4
+ "version": "15.0.0-dev.1748650424-ef2c1bfa7",
5
5
  "description": "A powerful library for interacting with the Discord API",
6
6
  "main": "./src/index.js",
7
7
  "types": "./typings/index.d.ts",
@@ -61,12 +61,12 @@
61
61
  "magic-bytes.js": "^1.10.0",
62
62
  "tslib": "^2.8.1",
63
63
  "undici": "7.8.0",
64
- "@discordjs/collection": "^2.1.1",
65
64
  "@discordjs/builders": "^1.11.1",
65
+ "@discordjs/collection": "^2.1.1",
66
+ "@discordjs/rest": "^2.5.0",
66
67
  "@discordjs/formatters": "^0.6.1",
67
- "@discordjs/ws": "^2.0.2",
68
68
  "@discordjs/util": "^1.1.1",
69
- "@discordjs/rest": "^2.5.0"
69
+ "@discordjs/ws": "^2.0.2"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@favware/cliff-jumper": "^4.1.0",
@@ -16,37 +16,42 @@ class ApplicationEmoji extends Emoji {
16
16
  */
17
17
  this.application = application;
18
18
 
19
- /**
20
- * The user who created this emoji
21
- * @type {?User}
22
- */
23
- this.author = null;
24
-
25
- this.managed = null;
26
- this.requiresColons = null;
27
-
28
19
  this._patch(data);
29
20
  }
30
21
 
31
22
  _patch(data) {
32
23
  if ('name' in data) this.name = data.name;
33
- if (data.user) this.author = this.client.users._add(data.user);
24
+ if (data.user) {
25
+ /**
26
+ * The user who created this emoji
27
+ * @type {User}
28
+ */
29
+ this.author = this.client.users._add(data.user);
30
+ }
34
31
 
35
32
  if ('managed' in data) {
36
33
  /**
37
- * Whether this emoji is managed by an external service
38
- * @type {?boolean}
34
+ * Whether this emoji is managed by an external service. Always `false` for application emojis
35
+ * @type {false}
39
36
  */
40
37
  this.managed = data.managed;
41
38
  }
42
39
 
43
40
  if ('require_colons' in data) {
44
41
  /**
45
- * Whether or not this emoji requires colons surrounding it
46
- * @type {?boolean}
42
+ * Whether this emoji requires colons surrounding it. Always `true` for application emojis
43
+ * @type {true}
47
44
  */
48
45
  this.requiresColons = data.require_colons;
49
46
  }
47
+
48
+ if ('available' in data) {
49
+ /**
50
+ * Whether this emoji is available. Always `true` for application emojis
51
+ * @type {true}
52
+ */
53
+ this.available = data.available;
54
+ }
50
55
  }
51
56
 
52
57
  /**
@@ -107,7 +112,8 @@ class ApplicationEmoji extends Emoji {
107
112
  other.id === this.id &&
108
113
  other.name === this.name &&
109
114
  other.managed === this.managed &&
110
- other.requiresColons === this.requiresColons
115
+ other.requiresColons === this.requiresColons &&
116
+ other.available === this.available
111
117
  );
112
118
  }
113
119
 
@@ -115,4 +121,49 @@ class ApplicationEmoji extends Emoji {
115
121
  }
116
122
  }
117
123
 
124
+ /**
125
+ * The emoji's name
126
+ * @name name
127
+ * @memberof ApplicationEmoji
128
+ * @instance
129
+ * @type {string}
130
+ * @readonly
131
+ */
132
+
133
+ /**
134
+ * Whether the emoji is animated
135
+ * @name animated
136
+ * @memberof ApplicationEmoji
137
+ * @instance
138
+ * @type {boolean}
139
+ * @readonly
140
+ */
141
+
142
+ /**
143
+ * Returns a URL for the emoji.
144
+ * @method imageURL
145
+ * @memberof ApplicationEmoji
146
+ * @instance
147
+ * @param {EmojiURLOptions} [options] Options for the image URL
148
+ * @returns {string}
149
+ */
150
+
151
+ /**
152
+ * The time the emoji was created at
153
+ * @name createdAt
154
+ * @memberof ApplicationEmoji
155
+ * @instance
156
+ * @type {Date}
157
+ * @readonly
158
+ */
159
+
160
+ /**
161
+ * The timestamp the emoji was created at
162
+ * @name createdTimestamp
163
+ * @memberof ApplicationEmoji
164
+ * @instance
165
+ * @type {number}
166
+ * @readonly
167
+ */
168
+
118
169
  exports.ApplicationEmoji = ApplicationEmoji;
@@ -62,4 +62,40 @@ class BaseGuildEmoji extends Emoji {
62
62
  * @returns {string}
63
63
  */
64
64
 
65
+ /**
66
+ * The emoji's name
67
+ * @name name
68
+ * @memberof BaseGuildEmoji
69
+ * @instance
70
+ * @type {string}
71
+ * @readonly
72
+ */
73
+
74
+ /**
75
+ * Whether or not the emoji is animated
76
+ * @name animated
77
+ * @memberof BaseGuildEmoji
78
+ * @instance
79
+ * @type {boolean}
80
+ * @readonly
81
+ */
82
+
83
+ /**
84
+ * The time the emoji was created at.
85
+ * @name createdAt
86
+ * @memberof BaseGuildEmoji
87
+ * @instance
88
+ * @type {Date}
89
+ * @readonly
90
+ */
91
+
92
+ /**
93
+ * The timestamp the emoji was created at.
94
+ * @name createdTimestamp
95
+ * @memberof BaseGuildEmoji
96
+ * @instance
97
+ * @type {number}
98
+ * @readonly
99
+ */
100
+
65
101
  exports.BaseGuildEmoji = BaseGuildEmoji;
@@ -591,13 +591,14 @@ export abstract class BaseGuild extends Base {
591
591
  export class BaseGuildEmoji extends Emoji {
592
592
  protected constructor(client: Client<true>, data: APIEmoji, guild: Guild | GuildPreview);
593
593
  public imageURL(options?: EmojiURLOptions): string;
594
- public get url(): string;
595
594
  public available: boolean | null;
596
595
  public get createdAt(): Date;
597
596
  public get createdTimestamp(): number;
598
597
  public guild: Guild | GuildPreview;
599
598
  public id: Snowflake;
600
- public managed: boolean | null;
599
+ public name: string;
600
+ public animated: boolean;
601
+ public managed: boolean;
601
602
  public requiresColons: boolean | null;
602
603
  }
603
604
 
@@ -1268,7 +1269,6 @@ export class Emoji extends Base {
1268
1269
  public name: string | null;
1269
1270
  public get identifier(): string;
1270
1271
  public imageURL(options?: EmojiURLOptions): string | null;
1271
- public get url(): string | null;
1272
1272
  public toJSON(): unknown;
1273
1273
  public toString(): string;
1274
1274
  }
@@ -1286,10 +1286,16 @@ export class ApplicationEmoji extends Emoji {
1286
1286
  private constructor(client: Client<true>, data: APIEmoji, application: ClientApplication);
1287
1287
 
1288
1288
  public application: ClientApplication;
1289
- public author: User | null;
1289
+ public author: User;
1290
1290
  public id: Snowflake;
1291
- public managed: boolean | null;
1292
- public requiresColons: boolean | null;
1291
+ public managed: false;
1292
+ public requiresColons: true;
1293
+ public name: string;
1294
+ public animated: boolean;
1295
+ public available: true;
1296
+ public get createdAt(): Date;
1297
+ public get createdTimestamp(): number;
1298
+ public imageURL(options?: EmojiURLOptions): string;
1293
1299
  public delete(): Promise<ApplicationEmoji>;
1294
1300
  public edit(options: ApplicationEmojiEditOptions): Promise<ApplicationEmoji>;
1295
1301
  public equals(other: ApplicationEmoji | unknown): boolean;
@@ -591,13 +591,14 @@ export abstract class BaseGuild extends Base {
591
591
  export class BaseGuildEmoji extends Emoji {
592
592
  protected constructor(client: Client<true>, data: APIEmoji, guild: Guild | GuildPreview);
593
593
  public imageURL(options?: EmojiURLOptions): string;
594
- public get url(): string;
595
594
  public available: boolean | null;
596
595
  public get createdAt(): Date;
597
596
  public get createdTimestamp(): number;
598
597
  public guild: Guild | GuildPreview;
599
598
  public id: Snowflake;
600
- public managed: boolean | null;
599
+ public name: string;
600
+ public animated: boolean;
601
+ public managed: boolean;
601
602
  public requiresColons: boolean | null;
602
603
  }
603
604
 
@@ -1268,7 +1269,6 @@ export class Emoji extends Base {
1268
1269
  public name: string | null;
1269
1270
  public get identifier(): string;
1270
1271
  public imageURL(options?: EmojiURLOptions): string | null;
1271
- public get url(): string | null;
1272
1272
  public toJSON(): unknown;
1273
1273
  public toString(): string;
1274
1274
  }
@@ -1286,10 +1286,16 @@ export class ApplicationEmoji extends Emoji {
1286
1286
  private constructor(client: Client<true>, data: APIEmoji, application: ClientApplication);
1287
1287
 
1288
1288
  public application: ClientApplication;
1289
- public author: User | null;
1289
+ public author: User;
1290
1290
  public id: Snowflake;
1291
- public managed: boolean | null;
1292
- public requiresColons: boolean | null;
1291
+ public managed: false;
1292
+ public requiresColons: true;
1293
+ public name: string;
1294
+ public animated: boolean;
1295
+ public available: true;
1296
+ public get createdAt(): Date;
1297
+ public get createdTimestamp(): number;
1298
+ public imageURL(options?: EmojiURLOptions): string;
1293
1299
  public delete(): Promise<ApplicationEmoji>;
1294
1300
  public edit(options: ApplicationEmojiEditOptions): Promise<ApplicationEmoji>;
1295
1301
  public equals(other: ApplicationEmoji | unknown): boolean;