discord.js 15.0.0-dev.1759968109-7f2935695 → 15.0.0-dev.1760184101-dd795252d

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/README.md CHANGED
@@ -134,9 +134,9 @@ If you don't understand something in the documentation, you are experiencing pro
134
134
  [website]: https://discord.js.org
135
135
  [website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
136
136
  [documentation]: https://discord.js.org/docs/packages/discord.js/stable
137
- [guide]: https://discordjs.guide/
138
- [guide-source]: https://github.com/discordjs/guide
139
- [guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
137
+ [guide]: https://discordjs.guide
138
+ [guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
139
+ [guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
140
140
  [discord]: https://discord.gg/djs
141
141
  [discord-developers]: https://discord.gg/discord-developers
142
142
  [source]: https://github.com/discordjs/discord.js/tree/main/packages/discord.js
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.1759968109-7f2935695",
4
+ "version": "15.0.0-dev.1760184101-dd795252d",
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.1759968109-7f2935695",
65
- "@discordjs/formatters": "^1.0.0-dev.1759968109-7f2935695",
66
- "@discordjs/collection": "^3.0.0-dev.1759968109-7f2935695",
67
- "@discordjs/util": "^2.0.0-dev.1759968109-7f2935695",
68
- "@discordjs/rest": "^3.0.0-dev.1759968109-7f2935695",
69
- "@discordjs/ws": "^3.0.0-dev.1759968109-7f2935695"
64
+ "@discordjs/collection": "^3.0.0-dev.1760184101-dd795252d",
65
+ "@discordjs/formatters": "^1.0.0-dev.1760184101-dd795252d",
66
+ "@discordjs/util": "^2.0.0-dev.1760184101-dd795252d",
67
+ "@discordjs/rest": "^3.0.0-dev.1760184101-dd795252d",
68
+ "@discordjs/ws": "^3.0.0-dev.1760184101-dd795252d",
69
+ "@discordjs/builders": "^2.0.0-dev.1760184101-dd795252d"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@favware/cliff-jumper": "^4.1.0",
@@ -83,8 +83,8 @@
83
83
  "turbo": "^2.5.8",
84
84
  "typescript": "~5.9.3",
85
85
  "@discordjs/api-extractor": "^7.52.7",
86
- "@discordjs/docgen": "^0.12.1",
87
- "@discordjs/scripts": "^0.1.0"
86
+ "@discordjs/scripts": "^0.1.0",
87
+ "@discordjs/docgen": "^0.12.1"
88
88
  },
89
89
  "engines": {
90
90
  "node": ">=22.12.0"
@@ -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',
@@ -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.',
@@ -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
- ? PermissionFlagsBits.ManageChannels | PermissionFlagsBits.Connect
475
- : PermissionFlagsBits.ViewChannel | PermissionFlagsBits.ManageChannels;
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);
@@ -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',
@@ -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',