discord.js 15.0.0-dev.1763510521-315f42278 → 15.0.0-dev.1763683321-0b1226337
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.
|
|
4
|
+
"version": "15.0.0-dev.1763683321-0b1226337",
|
|
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.12.1",
|
|
62
62
|
"tslib": "^2.8.1",
|
|
63
63
|
"undici": "7.16.0",
|
|
64
|
-
"@discordjs/builders": "2.0.0-dev.
|
|
65
|
-
"@discordjs/
|
|
66
|
-
"@discordjs/
|
|
67
|
-
"@discordjs/rest": "3.0.0-dev.
|
|
68
|
-
"@discordjs/util": "2.0.0-dev.
|
|
69
|
-
"@discordjs/ws": "3.0.0-dev.
|
|
64
|
+
"@discordjs/builders": "2.0.0-dev.1763683321-0b1226337",
|
|
65
|
+
"@discordjs/formatters": "1.0.0-dev.1763683321-0b1226337",
|
|
66
|
+
"@discordjs/collection": "3.0.0-dev.1763683321-0b1226337",
|
|
67
|
+
"@discordjs/rest": "3.0.0-dev.1763683321-0b1226337",
|
|
68
|
+
"@discordjs/util": "2.0.0-dev.1763683321-0b1226337",
|
|
69
|
+
"@discordjs/ws": "3.0.0-dev.1763683321-0b1226337"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@favware/cliff-jumper": "^4.1.0",
|
|
@@ -82,9 +82,9 @@
|
|
|
82
82
|
"tsd": "^0.33.0",
|
|
83
83
|
"turbo": "^2.5.8",
|
|
84
84
|
"typescript": "~5.9.3",
|
|
85
|
-
"@discordjs/scripts": "0.1.0",
|
|
86
85
|
"@discordjs/api-extractor": "7.52.7",
|
|
87
|
-
"@discordjs/docgen": "0.12.1"
|
|
86
|
+
"@discordjs/docgen": "0.12.1",
|
|
87
|
+
"@discordjs/scripts": "0.1.0"
|
|
88
88
|
},
|
|
89
89
|
"engines": {
|
|
90
90
|
"node": ">=22.12.0"
|
package/src/errors/ErrorCodes.js
CHANGED
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
*
|
|
84
84
|
* @property {'EmojiType'} EmojiType
|
|
85
85
|
* @property {'EmojiManaged'} EmojiManaged
|
|
86
|
-
* @property {'
|
|
86
|
+
* @property {'MissingGuildExpressionsPermission'} MissingGuildExpressionsPermission
|
|
87
87
|
*
|
|
88
88
|
* @property {'NotGuildSoundboardSound'} NotGuildSoundboardSound
|
|
89
89
|
* @property {'NotGuildSticker'} NotGuildSticker
|
|
@@ -217,7 +217,7 @@ const keys = [
|
|
|
217
217
|
|
|
218
218
|
'EmojiType',
|
|
219
219
|
'EmojiManaged',
|
|
220
|
-
'
|
|
220
|
+
'MissingGuildExpressionsPermission',
|
|
221
221
|
|
|
222
222
|
'NotGuildSoundboardSound',
|
|
223
223
|
'NotGuildSticker',
|
package/src/errors/Messages.js
CHANGED
|
@@ -88,8 +88,8 @@ const Messages = {
|
|
|
88
88
|
|
|
89
89
|
[ErrorCodes.EmojiType]: 'Emoji must be a string or GuildEmoji/ReactionEmoji',
|
|
90
90
|
[ErrorCodes.EmojiManaged]: 'Emoji is managed and has no Author.',
|
|
91
|
-
[ErrorCodes.
|
|
92
|
-
`Client must have Manage Guild Expressions permission in guild ${guild} to see emoji authors.`,
|
|
91
|
+
[ErrorCodes.MissingGuildExpressionsPermission]: guild =>
|
|
92
|
+
`Client must have Create Guild Expressions or Manage Guild Expressions permission in guild ${guild} to see emoji authors.`,
|
|
93
93
|
|
|
94
94
|
[ErrorCodes.NotGuildSoundboardSound]: action =>
|
|
95
95
|
`Soundboard sound is a default (non-guild) soundboard sound and can't be ${action}.`,
|
|
@@ -251,8 +251,8 @@ class GuildEmojiManager extends CachedManager {
|
|
|
251
251
|
|
|
252
252
|
const { me } = this.guild.members;
|
|
253
253
|
if (!me) throw new DiscordjsError(ErrorCodes.GuildUncachedMe);
|
|
254
|
-
if (!me.permissions.
|
|
255
|
-
throw new DiscordjsError(ErrorCodes.
|
|
254
|
+
if (!me.permissions.any(PermissionFlagsBits.CreateGuildExpressions | PermissionFlagsBits.ManageGuildExpressions)) {
|
|
255
|
+
throw new DiscordjsError(ErrorCodes.MissingGuildExpressionsPermission, this.guild);
|
|
256
256
|
}
|
|
257
257
|
|
|
258
258
|
const data = await this.client.rest.get(Routes.guildEmoji(this.guild.id, resolvedEmoji.id));
|
package/typings/index.d.mts
CHANGED
|
@@ -4051,7 +4051,7 @@ export enum DiscordjsErrorCodes {
|
|
|
4051
4051
|
|
|
4052
4052
|
EmojiType = 'EmojiType',
|
|
4053
4053
|
EmojiManaged = 'EmojiManaged',
|
|
4054
|
-
|
|
4054
|
+
MissingGuildExpressionsPermission = 'MissingGuildExpressionsPermission',
|
|
4055
4055
|
|
|
4056
4056
|
NotGuildSoundboardSound = 'NotGuildSoundboardSound',
|
|
4057
4057
|
NotGuildSticker = 'NotGuildSticker',
|
package/typings/index.d.ts
CHANGED
|
@@ -4051,7 +4051,7 @@ export enum DiscordjsErrorCodes {
|
|
|
4051
4051
|
|
|
4052
4052
|
EmojiType = 'EmojiType',
|
|
4053
4053
|
EmojiManaged = 'EmojiManaged',
|
|
4054
|
-
|
|
4054
|
+
MissingGuildExpressionsPermission = 'MissingGuildExpressionsPermission',
|
|
4055
4055
|
|
|
4056
4056
|
NotGuildSoundboardSound = 'NotGuildSoundboardSound',
|
|
4057
4057
|
NotGuildSticker = 'NotGuildSticker',
|