Releases: discordjs/discord.js
Releases · discordjs/discord.js
11.4.2
11.4.1
Overview
- Fixes bugs from
11.4.0
Deprecations
Guild#defaultChannel, there will be no fallback/alternative (407500b)- Permissions:
READ_MESSAGES, useVIEW_CHANNELinstead (1fe201a) ClientUser#setGame, useClientUser#setActivityinstead (cd06684)Collection#filterArray, convert to an array and filter, or the other way round instead. (09ddbcb)Collection#findAll, same asCollection#filterArraybut also pass a function instead (09ddbcb)Collection#exists, useCollection#filterand convert to a boolean instead. (09ddbcb)Collection#findandCollection#findKey's'key', 'property'overload, pass a function instead. (09ddbcb)- All user bot methods (95a2d25)
Fixes
11.4.0
Overview
- Fixes bugs from
11.3 - Backports features such as Rich Presence
Deprecations
Guild#defaultChannel, there will be no fallback/alternative (407500b)- Permissions:
READ_MESSAGES, useVIEW_CHANNELinstead (1fe201a) ClientUser#setGame, useClientUser#setActivityinstead (cd06684)Collection#filterArray, convert to an array and filter, or the other way round instead. (09ddbcb)Collection#findAll, same asCollection#filterArraybut also pass a function instead (09ddbcb)Collection#exists, useCollection#filterand convert to a boolean instead. (09ddbcb)Collection#findandCollection#findKey's'key', 'property'overload, pass a function instead. (09ddbcb)- All user bot methods (95a2d25)
Additions
- Backport
GuildChannel#manageablegetter (49ad8cc) - Backport
Guild#mfaLevelproperty (7b9e84d) - Backport the ability to dynamically generate Snowflakes (d9a091f)
- Backport
DiscordAPIError#methodproperty (8700e96) - Backport support for
discord.gg/invite/<code>invites when usingClient#fetchInvite(21326f6) - Backport
Emoji#deletablegetter (ed8ab91) - Backport
Permissions#valueOfmethod (2d83126) - Backport 2 basic role colors,
LUMINOUS_VIVID_PINKandDARK_VIVID_PINK(96b115e) - Backport
Guild#verifiedgetter (9169958) - Backport
TextChannel#setNSFWmethod (54913d9) - Backport
Game#toStringmethod (c0ca73a) - Backport
Emoji#fetchAuthormethod (dd7eedb) - Backport
GuildChannel#fetchInvitesmethod (9904167) - Backport
GuildMember#manageablegetter (9bb8831) - Backport
Collection#sweepmethod (2b6592e) - Backport
Collection#tapmethod (de7d90a) - Backport
Client#rateLimitevent (0d90798) (6f02be2) - Backport
Collection#partitionmethod (f456f4c) - Backport
RichPresence(6de5acb) - Backport
deletedproperty (3fa9ed1) - Backport
DefaultMessageNotifications(0702a0f) - Backport permissions improvements for
Guild#createChanneland addGuild#replacePermissionOverwritesandGuildChannel#lockPermissions(524a15d) - Backport
Webhook#tokenenumerability (96011cf) - Backport
Message#url(41f6eaa) - Backport
PRIORITY_SPEAKERpermission (c33ab1e) - Backport
TextChannel#bulkDeleteacceptsSnowflake[]parameter (c76f304) - Backport
GuildChannel#permissionsForthat also takes aRoleResolvable(1e5b5b8) - Backport
Permissions#toArray(6da423f)
Fixes
- Allow
GuildChannel#editto clear its parent (6e5b674) and topic (92b4216) - Allow
Role#editto set the permissions to0(no permissions) (7c0b617) 0is a validPermissionsResolvable(7c0b617)- Properly resolve permissions in
Client#generateInvite(c387e96) - Remove bulk deleted messages from cache (7c37a0d)
- Resolve with the correct member in
RESTMethods#addMemberRoleandRESTMethods#removeMemberRoles(de78a8d) - Do not update
Message#editedTimestampwhen there is none in the payload (3ba26ad) - Do not throw an error when accessing
MessageEmbed#hexColorwhen the embed has no color (b60ee25) - Use
Object.valuesinstead ofObject.keysto stay compatible with node 6 (feb0991) - Use the provided voice IP from discord directly instead of resolving its host name (b056227)
- Reject on null image resolvable with a meaningful error (44fefdf)
- Throw a descriptive error when not finding an opus engine (33a4232)
ClientUser#setActivityincorrectly resolving with theClientUserinstead of itsPresence(a85d801)- Clean up event listener on failure in
GuildMember#addRoleandGuildMember#removeRole(a89de09) - Increase and decrease the amount of max listeners dynamically to avoid MaxListenersExceededWarning when using
Collectors (60288d0) - Use
Buffer.allocinstead of deprecatednew Buffer(bd9c9ce) - Allow to remove the color of a role (2f2e281)
- Allow to send files of url which does not resolve to a buffer by default (ae28f52)
- Decrement
Guild#memberCountwhen an uncached member leaves (15a8e17) - Avoid permanently hanging of the burst ratelimit handler (3790619)
- Correctly resolve nicknames of users when creating a group dm with a bot (f23b617)
- Properly validating
CONNECTpermissions inVoiceChannel#deletable(0387d34) ShardClientUtil#senderroneously rejected on large payloads (eef4a4a), (493ba73)MessageReaction#fetchUserswill now properly resolve with the fetched user rather than the full cache (f238883)GuildMember#joinedAtis not guaranteed (ecf6e2b), (bd3d8d4)- Do not cache webhook users to preserver the correct username and avatar for all their messages (8a3ae87)
- Ensure
TextChannel#bulkDeletealways returns a Promise (72346fb) - Proper rejection when providing a falsy token (448f384, a667e44)
- Ensure
VoiceChannel#bitrategets set (695ff1e) - Keep reply option and do not throw an error when passing
Message#replyan embed (1d9edec) - Fix channel bitrate not set when missing unnecessary permissions (695ff1e)
- Do not try to send voice packets via udp when there is no socket (d81441f)
- Proper rejection of using
Emoji#fetchAuthorwhen an emoji is managed (d685e39) - Allow constructing
RichEmbedfromMessageEmbed(6d70da5, 87b4b23)
11.3.2
Overview
- Fixes bug causing bots to go silently offline after ~40 minutes (#2378)
- Includes TypeScript Definitions for the library
Deprecations
Guild#defaultChannelis now deprecated, there will be no fallback/alternative (407500b)- Permissions:
READ_MESSAGESis now deprecated, useVIEW_CHANNELinstead (1fe201a) ClientUser#setGame, useClientUser#setActivityinstead (cd06684)
Fixes
- Properly reset the remaining ratelimit of the gateway connection after reset (c8f78b2)
11.3.1
Overview
- Fixes bugs from
11.3 - Improves documentation & adds examples
Deprecations
Guild#defaultChannelis now deprecated, there will be no fallback/alternative (407500b)- Permissions:
READ_MESSAGESis now deprecated, useVIEW_CHANNELinstead (1fe201a) ClientUser#setGame, useClientUser#setActivityinstead (cd06684)
Fixes
- Disconnect from voice and remove channels of a guild upon leaving it (3df3741)
- Fix
VoiceConnection#playOpusStreamby passing alongopusoption to theStreamDispatcher(96904b1) Guild#createRoleincorrect guild reference (932980e)- Fix param in
ClientUser#setPresence(8cbefcc) - Don't overwrite typing entry making it impossible to stop typing in a channel (8df1ac9)
- Set the type in
CategoryChanneltocategoryand document its type (b5ff309) Webhook#senddocumented and returned incorrectly (e978253)resolveColornot interpreting DEFAULT correctly (52c402f)- Do not create additional guild instances when re-identifying as new session (dc92582)
- Let the process end gracefully after calling
Client#destroy(af75e43) - Properly ratelimit the gateway with 120/60 instead of 60/120 (7f5c103)
GuildAuditLogsusingGuild#fetchInvites(acdf43a)- Export
CategoryChannel(f64e924) Guild#fetchAuditLogsno longer internally callsGuild#fetchInvites(acdf43a)TextChannel#BulkDeletediscarding non-cached messages (363ead9)RichEmbeddidn't clone with timestamp (8f9e911)
11.3.0
Overview
- New features such as categories and different activity types
- Documentation improvements
Deprecations
Guild#defaultChannelis now deprecated, there will be no fallback/alternative (407500b)- Permissions:
READ_MESSAGESis now deprecated, useVIEW_CHANNELinstead (1fe201a) ClientUser#setGame, useClientUser#setActivityinstead (cd06684)
Additions
- Category Channel support (cce2480)
- Activity Types support (cd06684)
- Animated emojis support (659e89e)
- Creating a guild channel with permission overwrites (862b2ec)
- Allow before and after params for reaction users fetching (db5bdcd)
Fixes
GuildMember.permissions.missingis not a function (b274dba)- DMChannel messages not being cached (22da595, fb6d14d)
- Audit logs incorrectly retrieving webhook information (e40c3f8)
- Editing a voice channel sets the bitrate incorrectly (d705a0c)
- Guild settings from Userbot not being created on new guilds (1c34819)
- Default channel creation to text type (9f0417c)
- Bulk delete rejects regardless of filterOld (6683c40)
- Voice RTP headers fix (fc5d443)
- Incorrectly caching voice channel members (8226752)
- Animated icons not showing up as animated (d94ead7)
- Channel#startTyping doesn't throw non-catchable error (b3eb1bb, 2efe2d2)
11.2.0
Deprecations
Guild#defaultChannelis now deprecated, there will be no fallback/alternative (407500b)- Permissions:
READ_MESSAGESis now deprecated, useVIEW_CHANNELinstead (1fe201a)
Additions
MESSAGE_DELETEaction for audit logs (712305d)MESSAGEaction for audit logs (7d7f1b2)Invite#presenceCountandInvite#memberCount(ee622f7)Webhook#sendnow accepts multiple files (fd7cb41)Invite#textChannelCountandInvite#voiceChannelCount(28a29d5)- NSFW search option (3ec08d5)
MEMBER_ROLE_UPDATEaction for audit logs (2f1eb71)Guild#setExplicitContentFilter(e3232bd)- Expose
DiscordAPIErrorand API error constants (b9434ed) countoptional argument to Collection methods (d513c4b)TextChannel#nsfwis now a property to indicate if a channel is nsfw or not (ed84d76)- Audio bitrate support (cba4cc2)
Guild#nameAcronym(cd4a69d)- Reasons on every possible action that can take a reason (be4ccb3)
Guild#createRolenow takes into account the position you pass and sets it accordingly (be4ccb3)OAuth2Application#resetToken(f7664b0)- Retry on error code 500 (f7664b0)
- Support for
UserGuildSettings(f7664b0) - Attachment structure to make sending files/embeds easier (0b22d9a)
- You can now pass Attachments and RichEmbeds as MessageOptions or send embeds directly
- ResolveFile now accepts NodeStreams in addition to the already current options.
- Support for
GroupDMChannel#iconURL,GroupDMChannel#setIcon,
GroupDMChannel#setNameandGroupDMChannel#removeUser(17d7f5c) (1fe201a) - Support for
Guild#afkChannel,Guild#systemChannelandGuild#setSystemChannel(e76ebb4) - You can now pass a Collection to the filter of a Collector (bce5b67)
- Internally,
DiscordAPIErrornow takes a#pathto help narrow down issues (95e22c2)
Fixes
mentionstoMentionsin RESTMethods (e96daba)fetchMeMentionstofetchMentionsin RESTMethods (3a73628)Guild#deleteEmojiand editing related Emoji methods (41e0be1)GuildAuditLogsEntry#extranow properly returns values (7d7f1b2)GuildAuditLogsTarget.INVITE uses the right properties now (1fc6e3b)fetchMentionsin RESTMethods sends a proper auth header and params are now fully optional (1e115ef)Client#loginReject token errors properly (7980187)GuildMember#setVoiceChannelmoves member properly again (e3c3a4f)- Properly reject instead of throw in
GuildMember#addRoleandGuildMember#removeRole(45bc653) - Infinite loop in
DiscordAPIErrorreaching maximum call stack size (6eced4d) - Unhandled exception when using µws (19d4d3b)
- Don't ignore non-missing engine errors (2116fba)
- Remove unused
VoiceBroadcast#guaranteeOpusEngine(1ed6bbc) VoiceConnection#authenticateFailedrace condition (b5de89a)Client#tokenis not enumerable anymore (f1a74f2)Client#setTimeoutuses args correctly now (4ce4dc0)String.toLowerCase()errors in GuildAuditLogs (822c1f5)DiscordAPIError#messagesometimes being undefined (a56a24d) (bdc61a4) (8a9b6cb)- Double increments on the reaction count when the client reacts (2611efe)
- Consistently store message reactions keyed under their unicode (425efe1)
OAuth2Application#resetresets the token now as well (f7664b0)- Webhooks options now function properly (splitting as whole, with files and embeds) (0b22d9a)
- You can now reset the icon and splash with
Guild#edit(0b22d9a) - The burst ratelimit handler properly rejects with a
DiscordAPIErroron all 4xx now (0b22d9a ) - Buffers can again be send directly in the files array of the Message Options (95e22c2)
ADMINISTRATORpermission edge case which didn't resolve permissions correctly (0d6b7ce)
11.1.0
The branches have been reorganised a bit. Development is now done on the master branch, and the stable branch now houses the latest release. Additionally, the website has been moved into its own repository.
Overview
- Improved gateway and voice stability
- Added Voice Broadcasts for playing the same stream to multiple channels
- Ability to search for messages and interact with audit logs
- Nicer errors when making bad HTTP requests (e.g. when you don't have permission to ban a user)
- Added
User.tag->username#1234 - Better support for uws, it should work fine now
- We deprecated some stuff, see below
Additions
- Search functionality (beffb39, da32c2e, bde6749, d47f9d2)
SnowflakeUtilclass (andSnowflakealias for it) (4952647, e5e36d9)MessageOptions#replyto make any message a reply, even withMessage#edit()(5caa7df)ClientUser#settings(22b1c42)fetchRecommendedShards()guildsPerShardparameter (2b25641)- Websocket error 4011 (sharding required) handling (a3091f5)
- Choose whether or not to cache users/members when fetching them (78bf402)
- Option to filter old messages in
TextBasedChannel#bulkDelete(7f4846c) ClientUser#acceptInvite()(48be401)VoiceChannel#fulland improve joinable/join permission checks (d10ca8e)VoiceRegion,Client#fetchVoiceRegions, andGuild#fetchVoiceRegions(3f4cbd0)User#lastMessage,GuildMember#lastMessage, andTextBasedChannel#lastMessage(c7f5b44)GuildChannel#deletable(2beb77a)VolumeInterfaceand Opus Stream support (7ed58f5)- Support to update emojis (18729b2)
- Support for creating role-specific emojis (565c640)
- Expose
GuildMember#createDMandUser#createDM(8da915f) - Ability to clone channel topic when cloning a channel (0b5eeb0)
- Support for
sodium(4994474) RANDOMas a valid ColorResolvable (7c8f534)RichEmbed#addBlankField(cc3e7b2)- Support for adding users to guilds (OAuth2, dd6dd6f)
RichEmbed#attachFile(db5259c)- More OAuth support (61e12c6)
volumeChangeevent to VolumeInterface (eb069d0)- More GroupDM features (4c9d8d6)
- TypeDef for GuildMemberEditData (01d8d32)
Collection#clone(25bb602)GuildMember#colorRole,GuildMember#displayColor,GuildMember#displayHexColor, andGuildMember#hoistRole(e7b0afb)- Support for sending multiple files in the same message (a82d9f1)
TextBasedChannel#ackMessage(94062d1)- Allow
fetchMessageto work for non-bot accounts (64ce829) MessageMentions#members(8444f19)Guild#defaultRole(104f339)Guild#explicitContentFilter(d189b51)- FEC and PLP support for Opus encoding (8716702)
ClientUserSettings(801633b)VolumeInterface#volumeDecibelsandVolumeInterface#volumeLogarithmic(a49d4e6)User#tag(8436cbe)VoiceConnection#dispatcher(dce8e83)- Support for
libsodium.js(sodiumalternative) (8475a4a) Message#createReactionCollector(ca34c43)TextChannel#nsfw(5ac2269)- Export
CollectorandReactionCollector(13672cc) - Support for Audit Logs (4127cf6)
Guild#mefor the client's GuildMember in a Guild (5cad25e)
Changes
- Presence updates will only clone the presence objects if there is a
Client#presenceUpdateevent listener (7357fc2) - Improved
Collection's string form (b68283e) - Stop sending typing states as frequently (e216fc7)
- Improved request handling (ec1ed15)
- Refactored internal voice (audio manipulation offloaded to separate module) (70b35c8)
- Replace
EvaluatedPermissionswithPermissions(16fe48d) - Snowflake to Timestamp conversion is more precise (2897692)
- Remove pako dependency (fa609ca)
- Update
Role#hasPermissionto take an array and deprecateRole#hasPermissions(3e5096f) EmojiIdentifierResolvablenow supports emoji IDs and already-encoded unicode emojis (40c6109)GuildMember#addRole&GuildMember#addRolesnow throw a TypeError if no role resolvable is supplied (a652901)TextBasedChannel#fetchMessagenow an Error if the channel is either empty or the client has no READ_MESSAGE_HISTORY permission (95bcac9)- Rewrite WebSocket internals (195fcfa)
- Improve
ClientUser#setStatusfor selfbots (d6b7d31) MessageMentions#channelsbehaves nicely in DMs (e2c8ba5)- Update bufferutil dependency from
^2.0.0to^3.0.0(c880f10)
Fixes
User#defaultAvatarURLin Node 6 (f0adf8f)ClientUser#setAvatar(),ClientUser#createGuild(),Guild#createEmoji(),TextChannel#createWebhook()with Buffers (#1047, 258e4b9, 4447e36)MessageReaction#remove()(4c8e4fd, 3b9b062)Guild#largecan't ever go back tofalse(fdc8050)Message#isMemberMentioned()(42527ea)- Webhook message sending (c37cd3f)
TextBasedChannel#sendEmbed()with Arrays (8b0e5aa)Guild#largealwaysfalsefor user accounts (df02eee)- Reaction events fixed (f8b9bf6)
- Edge cases when fetching guild members (306ea97)
GuildMembersChunkpacket handling (c1a5bee)- Voice receiving for multiple streams (9a6cb64)
- Handle decoding errors for voice receiving (6fae179)
Message#mentionsnot being cleared on mentions updates (5059c59)- Role position calculations (1e94a9e)
EvaluatedPermissions#hasPermission(26becb5)- Emoji creation (ab5e57d)
- Incorrect member handling in member updates (2518a0f)
- WebhookClient crashing when hitting rate limits (d4a8491)
- Premature VoiceConnection disconnections (275c995)
- Bulk delete endpoint (33de408)
TextBasedChannel#bulkDeleteignoringfilterOldwhen a number is being passed instead of collection or array (6b26d28)- Permission overwrites resolution (8729ee6)
addRole/removeRolewhen the user has/doesn't have the role (633e3ca)Permissions#resolveto return a combined bitfield for arrays (79278bc)guildWebhooksendpoint (beffcd3)- Invite URL resolution (61f5051)
- Shared mentions on message update (bca101a)
- Emoji events (970bfff)
messageReactionAddhandling (6ce2439)- Some null
Message#mentionsproperties (e60d2bd) - Removing reactions (84aab10)
- Prevent reconnection loops if
client#destroyis invoked during thedisconnectevent (c5e2ea7) ClientUser#setGameno longer displaysPlaying nullon mobile devices (5605dc0)- Fix uWs reconnect logic (edf1a3e)
Deprecations
...11.0.0
Additions
- Support for uws (significantly faster websocket implementation) (c91ee7a, 0008a18, 945a2e3, c683790, 6afd80c)
- Support for ETF websocket encoding with erlpack (1e5afc1)
- Support for prebuilt FFMPEG packages from ffmpeg-binaries (52a83b9)
- Web distributions (2440a4a, 411c9bd, too many to list)
- ClientOptions.restTimeOffset to tweak the additional delay for ratelimiting (544e456)
- Message reactions (8105988 through 21b00e1 and more)
- Message embeds/rich text support (27270a3, b2bc844)
- TextBasedChannel.send() as a combined message sending method that can handle all message stuff (ed8fcf6)
- Improved emoji support (d129457)
- Emoji.identifier
emojiAddandemojiDeleteevents (cd657be)
- OAuthApplication support (c9dbf1f, 8533076, 8139bef, bef0523)
- Client.fetchApplication()
- Guild.applicationID
- OAuth2Application and ClientOAuth2Application classes
- Message.webhookID/fetchWebhook() (676a895, 8b7ef0c)
- Message.isMemberMentioned() (676a895)
- User/GuildMember.lastMessageId (b177aef)
- User.defaultAvatar/defaultAvatarURL/displayAvatarURL (586d652, 78026df)
- User.dmChannel (84503c8)
- ClientUser.fetchMentions() (e392107)
- UserProfile.premium (8139bef)
- GuildMember.displayName (586d652)
- Guild.splashURL (edfb27f)
- Guild.applicationID (8139bef, bef0523)
- Role.editable (7d02e73, 544540f)
- Nullable permission overwrites to reset (5dc30d6)
- GuildChannel.clone() (d766e72)
- Client.pings/ping (58c7c2e)
- Client.setTimeout()/clearTimeout() made public (f249607)
- Client.generateInvite() (fa7d63a)
- Client#disconnect event receives the CloseEvent from the websocket (b518437)
- StreamDispatcher#end event receives the reason for ending (fbe1929)
- Collection.equals() (a0b245b)
- TypeScript typings (b85a589)
Changes
- Client.login() no longer supports logging in with email + password (a20bac7)
- ClientUser.setEmail()/setPassword() now require the current password to be passed, in addition to setUsername() on user accounts (cecb0ae)
- Removed TextBasedChannel.sendTTSMessage() (ed8fcf6)
- Using Collection.find()/exists() with IDs will throw an error (ee3a03f)
- ShardingManager no longer marked as experimental (305070d)
- Huge internal simplification of promises (8306d50, 60e0d50)
- GuildMember.addRole()/removeRole() now use the new API functionality (638e51a)
- FileResolvable renamed to BufferResolvable (5fa9e35)
- Guild.createEmoji() and TextChannel.createWebhook() now accept BufferResolvable or Base64Resolvable (c041b1b)
- User.avatarURL supports animated gif avatars (2390e52)
- Role.toString() on the @everyone role will simply be
@everyone, rather than a full role mention (3451367) - Message.edit() updated to match new TextBasedChannel.send() functionality (ed8fcf6)
- Updated to Superagent 3 (6383d42)
Fixes
- VoiceConnection#speaking never emits (4e6b632)
- ChannelResolvables don't work with strings (cdf66f8)
- BufferResolvables failing improperly for URLs with an empty response body (a359f34)
- Message.edits (4ae1f63)
- Role.setPosition() returns Guild instead of Role (27e77d3)
- Role.setPosition() doesn't reorder other roles properly (e63432c)
- Disabled events not actually disabling (9323882)
- VoiceConnection.playConvertedStream() (eedc097)
- Guild sync assumes unknown members are new to the guild (b335824)
- Presence update before ready (6043a1f)
- Collection.set()/delete() don't chain properly (bd00bc4)
- Collection.reduce() doesn't perfectly mirror Array.reduce() (28ca830)
- ShardClientUtil emits an error upon multiple clients being created in one process (a0de75f)
- Crash when a guild member gets added to a guild connected to a voice channel that isn't cached (a0a3989)
- Other minor fixes