This repository has been archived by the owner on Aug 19, 2020. It is now read-only.
[Snyk] Upgrade discord.js from 11.5.1 to 12.0.2 #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Snyk has created this PR to upgrade discord.js from 11.5.1 to 12.0.2.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.Warning: This is a major version upgrade, and may be a breaking change.
Release notes
Package name: discord.js
Bug Fixes
#3917
) (a4f7e07
)#3904
) (f387337
)#3894
) (3e169cb
)#manageable
to check forCONNECT
(#3885
) (61ef46f
)Performance Improvements
#3916
) (69d4153
)Fixes
verificationLevel
inedit
method (66e625c)GuildMember
(cd746f3)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
(^)Client#setGame
and replaces it withClient#setActivity
while also adding a Presence store and a Presence structure (c4df250)Guild#deleteEmoji
in favour ofEmoji#delete
(c93c4ad)Attachment
in favour ofMessageAttachment
(methods stay the same) (d6b276b)MessageSearchOptions#sortBy
now defaults totimestamp
instead ofrecent
(291af7e)EvaluatedPermissions
(0a05761)MessageMentions#has
(2f84d95)GuildMember#permissionsFor
takes options object (61da73f)Collection.find()
/findKey()
(4122db0)Receiver#createStream
should take options (4a1b55d)play
(2b5fc77)StreamDispatcher#end
renamed toStreamDispatcher#finish
(6567319)MessageEmbed
's max length checks (9810bdb)Message#member
is now a getter (d93d628)Emoji
class, forEmoji
, nowGuildEmoji
andReactionEmoji
(aa3407f)lastMessage
property fromTextBasedChannel
,User
andMember
to a getter (630009f)Collection
methods and argument types and addCollection#partition
(a732402)client
,guild
,_content
non enumerable inMessageMentions
(e8ab049)VoiceConnection#client
andVoiceWebsocket#client
as getters (18646b7)Collection#deleteAll
(8e0ea9a)WebhookClient#token
property non-enumerable (96a0655)Client#voice
(c822563)createVoiceBroadcast
tocreateBroadcast
(9a092b6)Client#voiceConnections
(70d4b44)Guild#voiceConnection
=>Guild#voice#connection
(dd44647)VoiceBroadcast.{dispatchers -> subscribers}
(72dd872)Util#splitMessage
always returns an array (e645dd6)Guild#defaultRole
toRoleStore#everyone
(2df4f22)passes
(Discord drops duplicated audio packets now) (c715ed9)util
alias export (53a1f8f)MessageEmbed
builder field manipulation in line with underlying array functionality (#3761) (b727f6c)disableEveryone
renamed todisableMentions
(9cb306c)Additions
ClientOptions
(87e5a45)Message#edit
to accept aMessageEmbed
as options parameter (b7c55f0)after
option when fetching users who reacted with an emoji (f40a5e9)MessageEmbed
(63f6247)TextBasedChannel#bulkDelete
now accepts an array of ids and handles cases of 0 or 1 message(s) (3c0d7b8)Guild#verified
(69d8408)TextChannel#setNSFW
(0fc9459)Base
,CategoryChannel
,ClientApplication
,ClientUserChannelOverride
,ClientUserGuildSettings
,RichPresenceAssets
,UserConnection
,VoiceRegion
(0a05761)GuildChannel#setUserLimit
to reset when passing null (6254490)ReactionCollector#remove
on all reaction removals (09315ae)Shard#ready
property and related events (196cf76)GuildChannel#permissionsFor
to resolve permissions based off a role (b846cbd)Permissions#toArray
(d5b0cf9)GuildMember#managable
(36555c1)GuildChannel#fetchInvites
(47bc0fc)Guild#manageable#
getter (ef4bd92, e431ccd)Guild#mfaLevel
property (b3ff7c7)GuildChannelStore#create
options (c9c2d66)DiscordApiError#method
property (62605c4)Collection#tap
method (7a3a4d1)Collection#sweep
method (7a3a4d1)GuildEmoji#deletable
getter (fca6d3b)Shard#kill
method (fc81924)'Guild#defaultMessageNotifications
(30c7d6d, 270a278, 95b2dd3)execArgv
toShardingManager
(bfbb723, 6b3bfdd, 93f8c85, 938d87d)GuildEmoji#fetchAuthor
(e0cbf0b, f963621)Message#url
getter (ba32eec)PRIORITY_SPEAKER
(b38f537)Message#cleanContent
function toUtil
(f3d7f7c)presenceUpdate
(08eff66)Guild#fetchVanityCode()
(f8057b0)WEBHOOKS_UPDATE
events (0401b8a)GuildEmbed
(5787dee)UNKNOWN_WEBHOOK
error code (6be8172)ClientOptions#retryLimit
(be4d6f9)TextBasedChannel#lastPinTimestamp
andTextBasedChannel#lastPinAt
(e96a603)RateLimitPerUser
(d4c0bb2)ColorResolvable
(62e7e26)Emoji#createdAt
andEmoji#createdTimestamp
getters from GuildEmoji (71c04a3)ClientUser#setActivity
(1ee417c)GuildChannel#rateLimitPerUser
(8ec3b51)MessageEmbed#setTimestamp
to take a timestamp (1fe3608)ShardingManager
(ab3a439)GuildChannel
(d92ee2f)GuildChannel#create
to accept a position (a8b47a7) (21ec031)Presence#clientStatus
(75e264d)MessageEmbed#length
(1db7899)HTTPError
class (dd8ba00)Partials
(5c3f5d7) (6af0da1) (161f907)Webhook#url
getter (c078682)ClientVoiceManager
(70d4b44)ColorResolvable
(520810d)Invite#deletable
getter (c4b7957)VoiceChannel#editable
(870528e).voice
(ce1e3d2)Stream
permission (5154850)Guild#setRolePositions
method (8bc8ffe)Teams
support (a22aabf)Guild#edit
method and addGuild#setBanner
method (adb0823)Util#escapeMarkdown
(00c4098)for-await-of
loops (6d3c55b)Permissions#any
(a6810e2)VoiceState#kick
method (c86a615)Guild#partnered
(6f83e71)Constants#verificationLevels
(37ecf7b)@discordjs/collection
package (dad0cd8)VoiceState#streaming
(a8f06f2)MessageAttachment#spoiler
property (38d370f)MEMBER_MOVE
,MEMBER_DISCONNECT
,BOT_ADD
,MESSAGE_BULK_DELETE
,MESSAGE_PIN
,MESSAGE_UNPIN
,INTEGRATION_CREATE
,INTEGRATION_UPDATE
,INTEGRATION_DELETE
) (1bcc0c2) (a69ebbe)Webhook#avatarURL
method (330d5db)MessageFlags.FLAGS
(SOURCE_MESSAGE_DELETED
,URGENT
) &User#system
(4378283)Guild#systemChannelFlags
(f578cce)GuildResolvable
to include more structures (b4f00bf)Webhook#type
property andWebhook#created*
getters (ea76a56)RichPresenceAssets#largeImageURL
(bf31b28)PRIORITY_SPEAKING
bit (b5825c3)ImageURLOptions
(8014ddc)Guild#fetchBan
method (c779fe3)INVITE_CREATE
andINVITE_DELETE
events (929ff9c)MessageReaction#remove
method andClient#messageReactionRemoveEmoji
(030d263)14
,15
) (ef8acec)Guild#rulesChannel
andGuild#publicUpdatesChannel
(bea6da6)Collector#resetTimer
(acf724e)GuildEmoji
andInvite
toGuildResolvable
(91a025c)article
embed type (31a3a86)Fixes
Util.splitMessage
handle more edge cases (e58ff64)Util.mergeDefault
andUtil.convertToBuffer
to be destructured (58d8528)GuildMember#addRoles
andGuildMember#removeRoles
return the member before the change (84153be)presenceUpdate
fires twice, oldMember and newMember being the same both times (30dd3e0)MessageReaction#count
always being 1 (4e028d7)Guild#afk
,Guild#systemChannel
andGuild#icon
not removeable (b8a37b6)ClientUserGuildSettings
(87fa74a)userUpdate
not triggering for initial setting (or removal) of avatars (f95ae4f)Guild#setChannelPositions
(41c4999)GuildChannel#deletable
not allowing guild ID to be passed (3767b35)MessageRection#id
for default emojis (25ece18)VoiceConnection#setSpeaking
not returning the correct value (3871662)GuildAuditLogs
(8fbae13)Client#login
(69dcfa0)VoiceConnection.playFile
fails to be called twice (6b249ba)GuildMember#joinedTimestamp
(8d7e745)GuildChannel#edit
andRole#edit
with a position being incorrect (37f5256)Client#login
not using env.token (0277d1d)User#bot
being undefined (b255af0)TextBasedChannel#startTyping
(94a4a06)Guild#addMember
(21d09f3)toString
for channels (abb93c9)Message#edit
(59d5c5a)ReactionEmojis
to succeed (0f7ce3f)MessageReaction#count
twice when reacting to a message (513dbf2)GuildEmojiRoleStore
(d041cb2)MessageReaction
(4e0e64d)voiceSessionID
after changing server region (ef138fd)Role#edit
(f985b6b)guildMemberRemove
(b955a51)SreamDispatcher
(e845758)ClientUser
presence with provided one inClientOptions
(61ad947)Client#generateInvite
(8d065fa)Webhook#edit
from always trying to useclient.channels
(f293ddd, 077d41f)new Buffer
(42ce4f8)discord.gg/invite/<code>
invites inDataResolver
regex (ddab809)GuildEmoji#deletable
check guild permissions instead of channel ones (6cde6de)xsalsa20_poly1305_lite
andxsalsa20_poly1305_suffix
(43c92c1)Util#arraysEqual
in favor of new array comparison to stop guild from losing features inGuild#equals
(d02c303)GuildMember#joinedAt
returning an Invalid Date (46b19bb)VoiceChannel#deletable
returning true without required Connect permissions (0be0d25)Shard#send
andShardClientUtil#send
returning false on large payloads (512af54, c5fea45)ReactionUserStore#fetch
to be consistent withMessageStore#fetch
(0970848)GuildMember
joined properties as nullable and allow fetching a new member in that case (13bfceb, 5071477)StreamDispatcher#_step
_writeCallback
being called multiple times (04618f5)seek
option in voice (1cdee7b)FFMPEG_ARGUMENTS
when using seek (bf738b3)ShardingManager#respawnAll
iteration (f67d682)MessageReaction
to only delete cache if count and users are both empty (3a7a7d7)GuildEmoji#edit
and other issues (4ae58f6)Util.basename
being unreliable (0f63c50)VoiceChannel#members
should be a Collection, not an Array (7968442)GuildChannel#setParent
should allow channel to be a Snowflake (8ac6648)ReactionCollector#remove
when reaction is removed by collected user (038b142)voiceStateUpdate
onguildMemberRemove
(183ba25)MessageEmbed#proxyURL
property to video (7006f00)Overview
11.6.4
is being released to fix a bug related to the grouping of reaction related endpoints.Deprecations
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)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)@discordjs/uws
is now deprecated and will be removed with the next major release (5556b05)node-opus
is now deprecated, use@discordjs/opus
instead (6ab4649)Fixes
Overview
11.6.3
is being released to fix a regression introduced in11.6.2
.Deprecations
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)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)@discordjs/uws
is now deprecated and will be removed with the next major release (5556b05)node-opus
is now deprecated, use@discordjs/opus
instead (6ab4649)Fixes
messageReactionRemove
emission (bb4cb3e)Overview
11.6.2
is being released to fix a bug involving theReactionCollector
.Deprecations
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)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)@discordjs/uws
is now deprecated and will be removed with the next major release (5556b05)node-opus
is now deprecated, use@discordjs/opus
instead (6ab4649)Fixes
users
andtotal
when a reaction was actually collected (20075e3)Overview
11.6.1
is being released to update version references in the documentation; No code changes are included.Deprecations
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)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)@discordjs/uws
is now deprecated and will be removed with the next major release (5556b05)node-opus
is now deprecated, use@discordjs/opus
instead (6ab4649)Overview
11.6.0
is being released to backport new features from12.0.0-dev
.Deprecations
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)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)@discordjs/uws
is now deprecated and will be removed with the next major release (5556b05)node-opus
is now deprecated, use@discordjs/opus
instead (6ab4649)Additions
@discordjs/opus
(6ab4649)BitField
class (46e8bc4)Client#inviteCreate
andClient#inviteDelete
events (40afbc1)Client#messageReactionRemoveEmoji
event andMessageReaction#removeAll
(ab7f9e8)idle
options toCollector
s (ccd6043)Emoji#delete
(c355236)Game#emoji
,createdAt
, andcreatedTimestamp
(17b8b23)Guild#rulesChannelID
,Guild#rulesChannel
,Guild#publicUpdatesChannelID
, andGuild#publicUpdatesChannel
(b0aed05)Guild#setBanner
andbanner
toGuild#edit
(01826ae)ChannelData#reason
when creating a channel (7011c51)Guild
(e6a378b)banner
andbannerURL
description
embedChannelID
andembedChannel
maximumMembers
maximumPresences
widgetEnabled
widgetChannelID
andwidgetChannel
vanityURLCode
fetch
Integration
s,Guild#fetchIntegrations
, andGuild#createIntegration
(c955fd0)Guild#fetchAuditLogs
) (dbdb49e)MEMBER_MOVE
,MEMBER_DISCONNECT
BOT_ADD
MESSAGE_BULK_DELETE
,MESSAGE_PIN
,MESSAGE_UNPIN
INTEGRATION_CREATE
,INTEGRATION_UPDATE
,INTEGRATION_DELETE
Emoji#available
Guild#premiumTier
Guild#premiumSubscriptionCount
GuildMember#premiumSinceTimestamp
(alsopremiumSince
getter)USER_PREMIUM_GUILD_SUBSCRIPTION
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3
SystemChannelFlags
,Guild#systemChannelFlags
,Guild#setSystemChannelFlags
, andsystemChannelFlags
toGuild#edit
's options (330c410)GuildChannel#permissionsLocked
getter (2610bf5)GuildChannel#clone
(ab866d6)GuildMember#selfStream
(96037e1, 36c0496)Message#member
andMessageMentions#members
as they come from Discord (0f49d67)Message#flags
Message#reference
flags
toMessage#edit
Message#suppressEmbeds
MessageMentions#crosspostedChannels
CHANNEL_FOLLOW_ADD
toMessageType
User#system
GUILD_DISCOVERY_DISQUALIFIED
andGUILD_DISCOVERY_REQUALIFIED
toMessageTypes
(b0d0b81)MessageAttachment#spoiler
(4ca1864)MessageReaction
(88b675d)animated
client
createdTimestamp
createdAt
url
RichEmbed#spliceFields
andRichEmbed.normalizeField
(6eaf63f)RichEmbed#toJSON
returning an api-compatible object (97457e1)Permissions#any
(367c800)STREAM
Permission
(dcee09c)Presence#client
(f6d1db6)Presence#activities
(17b8b23)Webhook#edit
(fbe9bc4)Webhook
(30adb37)avatarURL
type
createdTimestamp
createdAt
url
Fixes
Client#setMaxListeners
if the max listener count is not 0 (903f6ca)ClientDataResolver#resolveUser
(464ef25)postCheck
when an event was received to allow stopping of the collector using themax
option (099a1a4)Guild#fetchMember
to be used with aSnowflake
(6f49aad)'text'
when creating a channel as default (505df2e)GuildAuditLogsEntry
target was deleted (43c0a79)GuildChannel
inGuildChannel#setPosition
instead ofGuild
(1121b2f)GuildMember
(f91ad70)GuildMember#manageable
(364914f)Util.arraysEqual
(fixingGuild#equals
mutatingGuild#features
and the old member's roles inguildMemberUpdate
) (8ddd061)RichPresenceAssets
(a505a55)VoiceConnection
when being forcibly disconnected (cbabc16)stoppedSpeaking
inVoiceReceiver
(91600a6)_trace
in Ready and Resumed WebSocket handlers (684bb1b)for..of
withObject.keys
instead offor..in
everywhere (6d7e1e4)Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs