Skip to content

feat(additional-info): add more breaking changes #1610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions guide/additional-info/updating-from-v14.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Make sure you're using the latest LTS version of Node. To check your Node versio

`ApplicationCommand#dmPermission` and `ApplicationCommand#setDMPermission()` have been removed. This was legacy functionality for commands—use contexts instead.

### ApplicationCommandManager

`ApplicationCommandManager#fetch()` method has been updated for consistency with other managers. Previously, it accepted two parameters: `id` (a snowflake or an options object) and an `options` object. Now, it only accepts a single `options` argument, which can be a snowflake or an options object that may include an `id` property.

### AnnouncementChannel

`AnnouncementChannel#addFollower()` now returns `FollowedChannelData` instead of a snowflake. This helps to expose the created webhook id in the target channel.
Expand All @@ -24,6 +28,10 @@ Make sure you're using the latest LTS version of Node. To check your Node versio

### Client

#### Emojis

`Client#emojis` has been removed due to confusion with the introduction of application emojis and performance impact. Use the `resolveGuildEmoji()` utility function to get a cached guild emoji.

#### Ping

`Client#ping` has been added to replace the old `WebSocketManager#ping`. This will be `null` when the heartbeat from the gateway is yet to be received.
Expand Down Expand Up @@ -67,6 +75,10 @@ The underlying WebSocket behaviour has changed. In version 14, this was a non-br
- [discordjs/discord.js#10420](https://github.com/discordjs/discord.js/pull/10420)
- [discordjs/discord.js#10556](https://github.com/discordjs/discord.js/pull/10556)

### ClientEvents

`ClientEvents` type has been removed. Use `ClientEventTypes` instead. This change ensures consistency with the rest of the event types across the library.

### ClientOptions

Removed `ClientOptions#shards` and `ClientOptions#shardCount` in favor of `ClientOptions#ws#shardIds` and `ClientOptions#ws#shardCount`.
Expand Down Expand Up @@ -135,6 +147,10 @@ emoji.imageURL();

`Emoji#url` has been removed. To allow more granular control of the returned extension, Use `Emoji#imageURL()` instead.

### EventEmitter

`BaseClient`, `Shard`, `ShardingManager`, and `Collector` now extend `AsyncEventEmitter` instead of `EventEmitter`. This comes from [@vladfrangu/async_event_emitter](https://npmjs.com/package/@vladfrangu/async_event_emitter).

### Events

- `Events.ShardError` has been removed.
Expand All @@ -160,6 +176,10 @@ This utility has been removed. Everything in this class is redundant as all meth

Removed `Guild#shard` as WebSocket shards are now handled by @discordjs/ws.

### GuildApplicationCommandManager

`GuildApplicationCommandManager#fetch()` method has been updated for consistency with other managers. Previously, it accepted two parameters: `id` (a snowflake or an options object) and an `options` object. Now, it only accepts a single `options` argument, which can be a snowflake or an options object that may include an `id` property.

### GuildAuditLogs

`GuildAuditLogsEntry.Targets.All` has been removed. It was not being used.
Expand All @@ -172,6 +192,10 @@ Removed `Guild#shard` as WebSocket shards are now handled by @discordjs/ws.

`GuildChannelManager#addFollower()` now returns `FollowedChannelData` instead of a snowflake. This helps to expose the created webhook id in the target channel.

### GuildMemberResolvable

`GuildMemberResolvable` type has been removed. It was defined as `GuildMember | UserResolvable`, but `UserResolvable` already includes `GuildMember`. Use `UserResolvable` instead.

### MessageManager

`MessageManager#crosspost()` has been moved to `GuildMessageManager`. This means it will no longer be exposed in `DMMessageManager`.
Expand Down