discord.js 15.0.0-dev.1760054515-a97ac8261 → 15.0.0-dev.1760227315-180dd60c6
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 +7 -7
- package/src/errors/ErrorCodes.js +0 -2
- package/src/errors/Messages.js +0 -1
- package/src/structures/Guild.js +0 -1
- package/src/structures/GuildChannel.js +4 -4
- package/src/structures/GuildMember.js +0 -1
- package/src/structures/ThreadChannel.js +0 -1
- package/typings/index.d.mts +0 -1
- package/typings/index.d.ts +0 -1
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.1760227315-180dd60c6",
|
|
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/
|
|
68
|
-
"@discordjs/
|
|
69
|
-
"@discordjs/
|
|
64
|
+
"@discordjs/builders": "^2.0.0-dev.1760227315-180dd60c6",
|
|
65
|
+
"@discordjs/rest": "^3.0.0-dev.1760227315-180dd60c6",
|
|
66
|
+
"@discordjs/util": "^2.0.0-dev.1760227315-180dd60c6",
|
|
67
|
+
"@discordjs/collection": "^3.0.0-dev.1760227315-180dd60c6",
|
|
68
|
+
"@discordjs/ws": "^3.0.0-dev.1760227315-180dd60c6",
|
|
69
|
+
"@discordjs/formatters": "^1.0.0-dev.1760227315-180dd60c6"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@favware/cliff-jumper": "^4.1.0",
|
package/src/errors/ErrorCodes.js
CHANGED
|
@@ -59,7 +59,6 @@
|
|
|
59
59
|
* @property {'GuildVoiceChannelResolve'} GuildVoiceChannelResolve
|
|
60
60
|
* @property {'GuildChannelOrphan'} GuildChannelOrphan
|
|
61
61
|
* @property {'GuildChannelUnowned'} GuildChannelUnowned
|
|
62
|
-
* @property {'GuildOwned'} GuildOwned
|
|
63
62
|
* @property {'GuildMembersTimeout'} GuildMembersTimeout
|
|
64
63
|
* @property {'GuildSoundboardSoundsTimeout'} GuildSoundboardSoundsTimeout
|
|
65
64
|
* @property {'GuildUncachedMe'} GuildUncachedMe
|
|
@@ -195,7 +194,6 @@ const keys = [
|
|
|
195
194
|
'GuildVoiceChannelResolve',
|
|
196
195
|
'GuildChannelOrphan',
|
|
197
196
|
'GuildChannelUnowned',
|
|
198
|
-
'GuildOwned',
|
|
199
197
|
'GuildMembersTimeout',
|
|
200
198
|
'GuildSoundboardSoundsTimeout',
|
|
201
199
|
'GuildUncachedMe',
|
package/src/errors/Messages.js
CHANGED
|
@@ -64,7 +64,6 @@ const Messages = {
|
|
|
64
64
|
[ErrorCodes.GuildVoiceChannelResolve]: 'Could not resolve channel to a guild voice channel.',
|
|
65
65
|
[ErrorCodes.GuildChannelOrphan]: 'Could not find a parent to this guild channel.',
|
|
66
66
|
[ErrorCodes.GuildChannelUnowned]: "The fetched channel does not belong to this manager's guild.",
|
|
67
|
-
[ErrorCodes.GuildOwned]: 'Guild is owned by the client.',
|
|
68
67
|
[ErrorCodes.GuildMembersTimeout]: "Members didn't arrive in time.",
|
|
69
68
|
[ErrorCodes.GuildSoundboardSoundsTimeout]: "Soundboard sounds didn't arrive in time.",
|
|
70
69
|
[ErrorCodes.GuildUncachedMe]: 'The client user as a member of this guild is uncached.',
|
package/src/structures/Guild.js
CHANGED
|
@@ -1425,7 +1425,6 @@ class Guild extends AnonymousGuild {
|
|
|
1425
1425
|
* .catch(console.error);
|
|
1426
1426
|
*/
|
|
1427
1427
|
async leave() {
|
|
1428
|
-
if (this.ownerId === this.client.user.id) throw new DiscordjsError(ErrorCodes.GuildOwned);
|
|
1429
1428
|
await this.client.rest.delete(Routes.userGuild(this.id));
|
|
1430
1429
|
return this;
|
|
1431
1430
|
}
|
|
@@ -462,7 +462,6 @@ class GuildChannel extends BaseChannel {
|
|
|
462
462
|
* @readonly
|
|
463
463
|
*/
|
|
464
464
|
get manageable() {
|
|
465
|
-
if (this.client.user.id === this.guild.ownerId) return true;
|
|
466
465
|
const permissions = this.permissionsFor(this.client.user);
|
|
467
466
|
if (!permissions) return false;
|
|
468
467
|
|
|
@@ -470,9 +469,11 @@ class GuildChannel extends BaseChannel {
|
|
|
470
469
|
if (permissions.has(PermissionFlagsBits.Administrator, false)) return true;
|
|
471
470
|
if (this.guild.members.me.communicationDisabledUntilTimestamp > Date.now()) return false;
|
|
472
471
|
|
|
472
|
+
const baseBitfield = PermissionFlagsBits.ViewChannel | PermissionFlagsBits.ManageChannels;
|
|
473
473
|
const bitfield = VoiceBasedChannelTypes.includes(this.type)
|
|
474
|
-
?
|
|
475
|
-
:
|
|
474
|
+
? baseBitfield | PermissionFlagsBits.Connect
|
|
475
|
+
: baseBitfield;
|
|
476
|
+
|
|
476
477
|
return permissions.has(bitfield, false);
|
|
477
478
|
}
|
|
478
479
|
|
|
@@ -483,7 +484,6 @@ class GuildChannel extends BaseChannel {
|
|
|
483
484
|
* @readonly
|
|
484
485
|
*/
|
|
485
486
|
get viewable() {
|
|
486
|
-
if (this.client.user.id === this.guild.ownerId) return true;
|
|
487
487
|
const permissions = this.permissionsFor(this.client.user);
|
|
488
488
|
if (!permissions) return false;
|
|
489
489
|
return permissions.has(PermissionFlagsBits.ViewChannel, false);
|
|
@@ -357,7 +357,6 @@ class GuildMember extends Base {
|
|
|
357
357
|
get manageable() {
|
|
358
358
|
if (this.user.id === this.guild.ownerId) return false;
|
|
359
359
|
if (this.user.id === this.client.user.id) return false;
|
|
360
|
-
if (this.client.user.id === this.guild.ownerId) return true;
|
|
361
360
|
if (!this.guild.members.me) throw new DiscordjsError(ErrorCodes.GuildUncachedMe);
|
|
362
361
|
return this.guild.members.me.roles.highest.comparePositionTo(this.roles.highest) > 0;
|
|
363
362
|
}
|
|
@@ -582,7 +582,6 @@ class ThreadChannel extends BaseChannel {
|
|
|
582
582
|
* @readonly
|
|
583
583
|
*/
|
|
584
584
|
get viewable() {
|
|
585
|
-
if (this.client.user.id === this.guild.ownerId) return true;
|
|
586
585
|
const permissions = this.permissionsFor(this.client.user);
|
|
587
586
|
if (!permissions) return false;
|
|
588
587
|
return permissions.has(PermissionFlagsBits.ViewChannel, false);
|
package/typings/index.d.mts
CHANGED
|
@@ -4038,7 +4038,6 @@ export enum DiscordjsErrorCodes {
|
|
|
4038
4038
|
GuildVoiceChannelResolve = 'GuildVoiceChannelResolve',
|
|
4039
4039
|
GuildChannelOrphan = 'GuildChannelOrphan',
|
|
4040
4040
|
GuildChannelUnowned = 'GuildChannelUnowned',
|
|
4041
|
-
GuildOwned = 'GuildOwned',
|
|
4042
4041
|
GuildMembersTimeout = 'GuildMembersTimeout',
|
|
4043
4042
|
GuildSoundboardSoundsTimeout = 'GuildSoundboardSoundsTimeout',
|
|
4044
4043
|
GuildUncachedMe = 'GuildUncachedMe',
|
package/typings/index.d.ts
CHANGED
|
@@ -4038,7 +4038,6 @@ export enum DiscordjsErrorCodes {
|
|
|
4038
4038
|
GuildVoiceChannelResolve = 'GuildVoiceChannelResolve',
|
|
4039
4039
|
GuildChannelOrphan = 'GuildChannelOrphan',
|
|
4040
4040
|
GuildChannelUnowned = 'GuildChannelUnowned',
|
|
4041
|
-
GuildOwned = 'GuildOwned',
|
|
4042
4041
|
GuildMembersTimeout = 'GuildMembersTimeout',
|
|
4043
4042
|
GuildSoundboardSoundsTimeout = 'GuildSoundboardSoundsTimeout',
|
|
4044
4043
|
GuildUncachedMe = 'GuildUncachedMe',
|