Releases: discordjs/discord.js
Releases · discordjs/discord.js
12.1.1
12.1.0
Bug Fixes
- Channel: ensure partial DMChannels get created (#3954) (8c0a940)
- Guild: default max presences value (#3970) (0f38d80)
- GuildEmojiManager: throw an error if image resolving fails (#3934) (ca75eb5)
- GuildMemberRolesManager: type error should mention Role and Snowflake too (#3931) (e5264ab)
- MessageReaction: fetching a removed partial custom emoji (#3955) (a36a65b)
- Partials: correctly document properties for partialized structures (#3922) (8b906c6)
- RequestHandler: a global timeout implies limited (#3950) (7b38f46)
- Typings: client message event should not emit PartialMessage (#3983) (f2fdb93)
- TypingStart: typing methods returning falsy values (#3939) (495cfa9)
- Util: cleanContent should remove mentions after formatting mentions (#3936) (44ac5fe)
- WebsocketShard: pass ignore ACK when Discord asks for a beat (#3993) (65e8c92)
- GuildDelete always emit guildUnavailable when a guild becomes unavailable (#3975) (2157401)
Features
- AllowedMentions: add support for MessageOptions#allowedMentions (#3893) (df324e2)
- GuildPreview: implement support for "preview" endpoint (#3965) (88133d0)
- Permissions: Adds VIEW_GUILD_INSIGHTS (#3928) (5b9cdc5)
- Types: support type-guarding using Channel#type string literal (#3918) (69d69f2)
- Typings: allow event listener type param inference (#3944) (2be9eba)
Reverts
11.6.3
Overview
11.6.3
is being released to fix a regression introduced in 11.6.2
.
Deprecations
- All user account-only methods have been deprecated (95a2d25)
ClientUser#setGame
in favor ofClientUser#setActivity
(cd06684)Collection#exists
in favor ofCollection#some
(09ddbcb)Collection#find
andCollection#findKey
's'prop', 'val'
overload is deprecated, pass a function instead (09ddbcb)Collection#filterArray
, convert to an array and filter, or the other way around instead. (09ddbcb)Collection#findAll
, filter and then convert to an array, or the other way around. In addition, the'prop', 'val'
overload is also deprecated - pass a function instead (09ddbcb)Guild#createChannel
when specifying options without using an options object (7ea88ad)Guild#defaultChannel
, there will be no fallback/alternative (407500b)Guild#deleteEmoji
in favor ofEmoji#delete
(c355236)- The old method signature of
GuildChannel#clone
in favor of using an options object (ab866d6) Permissions.flags
:READ_MESSAGES
in favor ofVIEW_CHANNEL
(1fe201a)Permissions#allowed
andPermissions#denied
in favor ofPermissions#allow
andPermissions#deny
respectively (58ba2c7)PermissionOverwrites#allowed
andPermissionOverwrites#denied
in favor ofPermissionOverwrites#allow
andPermissionOverwrites#deny
(db492e6)- The peer dependency
@discordjs/uws
is now deprecated and will be removed with the next major release (5556b05) - The peer dependency
node-opus
is now deprecated, use@discordjs/opus
instead (6ab4649)
Fixes
messageReactionRemove
emission (bb4cb3e)
12.0.2
Bug Fixes
- APIRequest: only use form data when actually sending files (
#3917
) (a4f7e07
) - Guild: resolve role id and call existing handler (
#3904
) (f387337
) - MessageEmbed: skip validation of fields when inside a message (
#3894
) (3e169cb
) - VoiceChannel: adapt
#manageable
to check forCONNECT
(#3885
) (61ef46f
)
Performance Improvements
11.6.2
Overview
11.6.2
is being released to fix a bug involving the ReactionCollector
.
Deprecations
- All user account-only methods have been deprecated (95a2d25)
ClientUser#setGame
in favor ofClientUser#setActivity
(cd06684)Collection#exists
in favor ofCollection#some
(09ddbcb)Collection#find
andCollection#findKey
's'prop', 'val'
overload is deprecated, pass a function instead (09ddbcb)Collection#filterArray
, convert to an array and filter, or the other way around instead. (09ddbcb)Collection#findAll
, filter and then convert to an array, or the other way around. In addition, the'prop', 'val'
overload is also deprecated - pass a function instead (09ddbcb)Guild#createChannel
when specifying options without using an options object (7ea88ad)Guild#defaultChannel
, there will be no fallback/alternative (407500b)Guild#deleteEmoji
in favor ofEmoji#delete
(c355236)- The old method signature of
GuildChannel#clone
in favor of using an options object (ab866d6) Permissions.flags
:READ_MESSAGES
in favor ofVIEW_CHANNEL
(1fe201a)Permissions#allowed
andPermissions#denied
in favor ofPermissions#allow
andPermissions#deny
respectively (58ba2c7)PermissionOverwrites#allowed
andPermissionOverwrites#denied
in favor ofPermissionOverwrites#allow
andPermissionOverwrites#deny
(db492e6)- The peer dependency
@discordjs/uws
is now deprecated and will be removed with the next major release (5556b05) - The peer dependency
node-opus
is now deprecated, use@discordjs/opus
instead (6ab4649)
Fixes
- Only modify
users
andtotal
when a reaction was actually collected (20075e3)
12.0.1
12.0.0
See the updating guide for a better representation of what changed and how you have to change/adapt your code.
Guild#fetchMembers
removed in favour ofGuildMemberStore#fetch
(^)- Rewrite Presence. This removes
Client#setGame
and replaces it withClient#setActivity
while also adding a Presence store and a Presence structure (c4df250) - Removed
Guild#deleteEmoji
in favour ofEmoji#delete
(c93c4ad) - Removed
Attachment
in favour ofMessageAttachment
(methods stay the same) (d6b276b) MessageSearchOptions#sortBy
now defaults totimestamp
instead ofrecent
(291af7e)- Removed exported
EvaluatedPermissions
(0a05761) - Rename ShardingManager#launch event to shardCreate (0d188c0)
- Add more options to
MessageMentions#has
(2f84d95) GuildMember#permissionsFor
takes options object (61da73f)
- Return undefined from
Collection.find()
/findKey()
(4122db0) Receiver#createStream
should take options (4a1b55d)- Unified audio playing methods, now called
play
(2b5fc77) StreamDispatcher#end
renamed toStreamDispatcher#finish
(6567319)- Remove
MessageEmbed
's max length checks (9810bdb) Message#member
is now a getter (d93d628)- Create a base
Emoji
class, forEmoji
, nowGuildEmoji
andReactionEmoji
(aa3407f) - Fixed a typo in Error constants (352bd13)
- Make getters return null instead of undefined (799eea9)
- Convert the
lastMessage
property fromTextBasedChannel
,User
andMember
to a getter (630009f) - Remove various
Collection
methods and argument types and addCollection#partition
(a732402) - Make
client
,guild
,_content
non enumerable inMessageMentions
(e8ab049) - Mark
VoiceConnection#client
andVoiceWebsocket#client
as getters (18646b7) - Remove Userbot methods and properties (5afd77a)
- Remove
Collection#deleteAll
(8e0ea9a) - Use null for getters (147488d)
- Remove Clyde (94214fa)
- Make
WebhookClient#token
property non-enumerable (96a0655) - Move broadcasts to
Client#voice
(c822563) - Rename
createVoiceBroadcast
tocreateBroadcast
(9a092b6) - Remove
Client#voiceConnections
(70d4b44) Guild#voiceConnection
=>Guild#voice#connection
(dd44647)- Remove Guild.voiceConnection and VoiceChannel.connection (bcb0cd8)
VoiceBroadcast.{dispatchers -> subscribers}
(72dd872)Util#splitMessage
always returns an array (e645dd6)- Move
Guild#defaultRole
toRoleStore#everyone
(2df4f22) - Remove
passes
(Discord drops duplicated audio packets now) (c715ed9) - Remove
util
alias export (53a1f8f) - Implement Managers (#3696) (bbdbc4c)
- Bring
MessageEmbed
builder field manipulation in line with underlying array functionality (#3761) (b727f6c) disableEveryone
renamed todisableMentions
(9cb306c)
Additions
- Allow fetching of the author of an emoji (e0cbf0b)
- Allow setting an initial presence via
ClientOptions
(87e5a45) - Allow
Message#edit
to accept aMessageEmbed
as options parameter (b7c55f0) after
option when fetching users who reacted with an emoji (f40a5e9)- Channel categories (c46c092) (64cbb98)
- Deep copy fields for
MessageEmbed
(63f6247) - Expose DataStore (d41675c)
TextBasedChannel#bulkDelete
now accepts an array of ids and handles cases of 0 or 1 message(s) (3c0d7b8)- Allow editing the channel of webhooks (d8850db)
- Support
Guild#verified
(69d8408) - Rate limit event (ee1d4c5)
- Zlib stream compression (0589b7d)
TextChannel#setNSFW
(0fc9459)- Expose
Base
,CategoryChannel
,ClientApplication
,ClientUserChannelOverride
,ClientUserGuildSettings
,RichPresenceAssets
,UserConnection
,VoiceRegion
(0a05761) - Allow
GuildChannel#setUserLimit
to reset when passing null (6254490) - Emit
ReactionCollector#remove
on all reaction removals (09315ae) Shard#ready
property and related events (196cf76)- Custom Structures (77fc046, dcf48e2)
- Animated Emojis (84e4dd6) (2318812)
- Allow passing a function to shard eval (8aafcd6) (42c0e50...
11.6.1
Overview
11.6.1
is being released to update version references in the documentation; No code changes are included.
Deprecations
- All user account-only methods have been deprecated (95a2d25)
ClientUser#setGame
in favor ofClientUser#setActivity
(cd06684)Collection#exists
in favor ofCollection#some
(09ddbcb)Collection#find
andCollection#findKey
's'prop', 'val'
overload is deprecated, pass a function instead (09ddbcb)Collection#filterArray
, convert to an array and filter, or the other way around instead. (09ddbcb)Collection#findAll
, filter and then convert to an array, or the other way around. In addition, the'prop', 'val'
overload is also deprecated - pass a function instead (09ddbcb)Guild#createChannel
when specifying options without using an options object (7ea88ad)Guild#defaultChannel
, there will be no fallback/alternative (407500b)Guild#deleteEmoji
in favor ofEmoji#delete
(c355236)- The old method signature of
GuildChannel#clone
in favor of using an options object (ab866d6) Permissions.flags
:READ_MESSAGES
in favor ofVIEW_CHANNEL
(1fe201a)Permissions#allowed
andPermissions#denied
in favor ofPermissions#allow
andPermissions#deny
respectively (58ba2c7)PermissionOverwrites#allowed
andPermissionOverwrites#denied
in favor ofPermissionOverwrites#allow
andPermissionOverwrites#deny
(db492e6)- The peer dependency
@discordjs/uws
is now deprecated and will be removed with the next major release (5556b05) - The peer dependency
node-opus
is now deprecated, use@discordjs/opus
instead (6ab4649)
11.6.0
Overview
11.6.0
is being released to backport new features from 12.0.0-dev
.
Deprecations
- All user account-only methods have been deprecated (95a2d25)
ClientUser#setGame
in favor ofClientUser#setActivity
(cd06684)Collection#exists
in favor ofCollection#some
(09ddbcb)Collection#find
andCollection#findKey
's'prop', 'val'
overload is deprecated, pass a function instead (09ddbcb)Collection#filterArray
, convert to an array and filter, or the other way around instead. (09ddbcb)Collection#findAll
, filter and then convert to an array, or the other way around. In addition, the'prop', 'val'
overload is also deprecated - pass a function instead (09ddbcb)Guild#createChannel
when specifying options without using an options object (7ea88ad)Guild#defaultChannel
, there will be no fallback/alternative (407500b)Guild#deleteEmoji
in favor ofEmoji#delete
(c355236)- The old method signature of
GuildChannel#clone
in favor of using an options object (ab866d6) Permissions.flags
:READ_MESSAGES
in favor ofVIEW_CHANNEL
(1fe201a)Permissions#allowed
andPermissions#denied
in favor ofPermissions#allow
andPermissions#deny
respectively (58ba2c7)PermissionOverwrites#allowed
andPermissionOverwrites#denied
in favor ofPermissionOverwrites#allow
andPermissionOverwrites#deny
(db492e6)- The peer dependency
@discordjs/uws
is now deprecated and will be removed with the next major release (5556b05) - The peer dependency
node-opus
is now deprecated, use@discordjs/opus
instead (6ab4649)
Additions
- Add support for
@discordjs/opus
(6ab4649) - Add
BitField
class (46e8bc4) - Add
Client#inviteCreate
andClient#inviteDelete
events (40afbc1) - Add
Client#messageReactionRemoveEmoji
event andMessageReaction#removeAll
(ab7f9e8) - Add
idle
options toCollector
s (ccd6043) - Add
Emoji#delete
(c355236) - Add
Game#emoji
,createdAt
, andcreatedTimestamp
(17b8b23) - Add
Guild#rulesChannelID
,Guild#rulesChannel
,Guild#publicUpdatesChannelID
, andGuild#publicUpdatesChannel
(b0aed05) - Add
Guild#setBanner
andbanner
toGuild#edit
(01826ae) - Document
ChannelData#reason
when creating a channel (7011c51) - Add the following properties, getters, and methods to
Guild
(e6a378b) -
banner
andbannerURL
-
description
-
embedChannelID
andembedChannel
-
maximumMembers
-
maximumPresences
-
widgetEnabled
-
widgetChannelID
andwidgetChannel
-
vanityURLCode
-
fetch
- Add
Integration
s,Guild#fetchIntegrations
, andGuild#createIntegration
(c955fd0) - Handle new audit log types (
Guild#fetchAuditLogs
) (dbdb49e) -
MEMBER_MOVE
,MEMBER_DISCONNECT
-
BOT_ADD
-
MESSAGE_BULK_DELETE
,MESSAGE_PIN
,MESSAGE_UNPIN
-
INTEGRATION_CREATE
,INTEGRATION_UPDATE
,INTEGRATION_DELETE
- Add support for guild boosting (b892436)
-
Emoji#available
-
Guild#premiumTier
-
Guild#premiumSubscriptionCount
-
GuildMember#premiumSinceTimestamp
(alsopremiumSince
getter)
-
- Four new related message types:
-
-
USER_PREMIUM_GUILD_SUBSCRIPTION
-
-
-
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1
-
-
-
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2
-
-
-
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3
-
- Add
SystemChannelFlags
,Guild#systemChannelFlags
,Guild#setSystemChannelFlags
, andsystemChannelFlags
toGuild#edit
's options (330c410) - Add
GuildChannel#permissionsLocked
getter (2610bf5) - Add support for clone options when cloning a channel using
GuildChannel#clone
(ab866d6) - Add
GuildMember#selfStream
(96037e1, 36c0496) - Cache
Message#member
andMessageMentions#members
as they come from Discord (0f49d67) - Add the following (7e9c995)
-
Message#flags
-
Message#reference
-
flags
toMessage#edit
-
Message#suppressEmbeds
-
MessageMentions#crosspostedChannels
-
CHANNEL_FOLLOW_ADD
toMessageType
-
User#system
- Add
GUILD_DISCOVERY_DISQUALIFIED
andGUILD_DISCOVERY_REQUALIFIED
toMessageTypes
(b0d0b81) - Add
MessageAttachment#spoiler
(4ca1864) - Add the following properties to
MessageReaction
(88b675d) -
animated
-
client
-
createdTimestamp
-
createdAt
-
url
- Add
RichEmbed#spliceFields
andRichEmbed.normalizeField
(6eaf63f) - Add
RichEmbed#toJSON
returning an api-compatible object (97457e1) - Add
Permissions#any
(367c800) - Add
STREAM
Permission
(dcee09c) - Document
Presence#client
(f6d1db6) - Add
Presence#activities
(17b8b23) - Add ability specify a channel and reason when editing a through
Webhook#edit
(fbe9bc4) - Add the following properties to
Webhook
(30adb37) -
avatarURL
-
type
-
createdTimestamp
-
createdAt
-
url
Fixes
- Only use
Client#setMaxListeners
if the max listener count is not 0 (903f6ca) - Return a user when resolving from guild in
ClientDataResolver#resolveUser
(464ef25) - Always run
postCheck
when an event was received to allow stopping of the collector using themax
option (099a1a4) - Allow
Guild#fetchMember
to be used with aSnowflake
(6f49aad) - Set the integer constant instead of
'text'
when creating a channel as default (505df2e) - Default to an object with id property if the
GuildAuditLogsEntry
target was deleted (43c0a79) - Return
GuildChannel
inGuildChannel#setPosition
instead ofGuild
(1121b2f) - Mark messages of deleted channels as deleted (d1d0d75)
- Filter out duplicated roles when editing the roles of a
GuildMember
(f91ad70) - Allow owner to override
GuildMember#manageable
(364914f) - Do not mutate input arrays in
Util.arraysEqual
(fixingGuild#equals
mutatingGuild#features
and the old member's roles inguildMemberUpdate
) (8ddd061) - Return the correct link for twitch previews as part of
RichPresenceAssets
(a505a55) - Internally disconnect and cleanup
VoiceConnection
when being forcibly disconnected (cbabc16) - Fix speaking events and voice receive (fbcd363)
- Remove opus decoder from map in
stoppedSpeaking
inVoiceReceiver
(91600a6) - No longer use deprecated
_trace
in Ready and Resumed WebSocket handlers (684bb1b) - Use
for..of
withObject.keys
instead offor..in
everywhere (6d7e1e4)
11.5.1
Overview
11.5.1
is being released to fix bugs from 11.5.0
, most notably not being able to modify the nickname of the current user.
Deprecations
- All user account-only methods have been deprecated (95a2d25)
ClientUser#setGame
in favor ofClientUser#setActivity
(cd06684)Collection#exists
in favor ofCollection#some
(09ddbcb)Collection#find
andCollection#findKey
's'prop', 'val'
overload is deprecated, pass a function instead (09ddbcb)Collection#filterArray
, convert to an array and filter, or the other way around instead. (09ddbcb)Collection#findAll
, filter and then convert to an array, or the other way around. In addition, the'prop', 'val'
overload is also deprecated - pass a function instead (09ddbcb)Guild#createChannel
when specifying options without using an options object (7ea88ad)Guild#defaultChannel
, there will be no fallback/alternative (407500b)Permissions.flags
:READ_MESSAGES
in favor ofVIEW_CHANNEL
(1fe201a)Permissions#allowed
andPermissions#denied
in favor ofPermissions#allow
andPermissions#deny
respectively (58ba2c7)PermissionOverwrites#allowed
andPermissionOverwrites#denied
in favor ofPermissionOverwrites#allow
andPermissionOverwrites#deny
(db492e6)