Skip to content

Releases: discordjs/discord.js

8.2.0

02 Oct 04:31
Compare
Choose a tag to compare
8.2.0 Pre-release
Pre-release
  • Gateway v6 support
  • Emoji support
  • Webhook support
  • .toObject() support for structures
  • Fix checks for Administrator permission
  • Bot token detection
  • Various crash fixes
  • Various voice fixes

9.3.0

24 Sep 18:56
Compare
Choose a tag to compare

Additions

  • Message sweeping functionality, so messages can be cleared from the caches after a specified time, in addition to the current max limit (afc8e5b, 9503990, 8f1bc5e, 6075ec0, e5bac13)
    • ClientOptions.message_cache_lifetime/message_sweep_interval
    • Client.sweepMessages to manually sweep
  • Sharding manager features
    • Automatically respawns shards that exit (fc9d049, 063be5c)
    • Shard.send to send a message to a shard (edd174a, b795ed8)
    • ShardingManager.broadcast to send messages to all shards (edd174a, b795ed8)
    • Shard.fetchClientValue to get a client property value from a shard (1008f60)
    • ShardingManager.fetchClientValues to get a client property value from all shards (1008f60)
    • Shard.eval to eval code on a shard (e4f416a, 1008f60)
    • ShardingManager.broadcastEval to eval code on all shards (e4f416a, 1008f60)
    • ShardingManager.spawn delay parameter (7f652f7)
  • Exports for all structures, so that you can use instanceof. There is probably no reason to ever instantiate these yourself. (221fc7a, c5982b0, f3bab30)
  • version export (require('discord.js').version) (ec6453a, cdf3136)
  • Client#disconnect event (7cb2e8e)
  • Collection.reduce (84b33f9)
  • Collection.keyArray/firstKey/lastKey/randomKey (ac85ffc)
  • Guild.voiceConnection and VoiceChannel.connection (420f2ec, a27f6c9, e9a7a06)
  • Message.editCode (46d7ded)
  • Message.editable/deletable/pinnable (bbddfef)
  • Guild.pruneMembers (15d7f8e)
  • GuildMember.highestRole (b8e3094, 1268653)
  • GuildMember.kickable/bannable (b8e3094)
  • Role.mentionable (529d720)
  • Role.members (46c28c0)
  • Invite.url/toString (0bd00b1)
  • TextBasedChannel.sendCode without a language (862ec6a, 136cf66)
  • ClientDataResolver.resolveUserID (bbddfef)

Fixes

  • Timeouts are leaked extremely heavily, and intervals occasionally - main source of massive memory leaks - the more guilds a bot has, the worse this gets (7d86676)
  • VoiceConnection leaks Client#voiceStateUpdate listeners (6f7deba, 0559aaf, 5a9753e)
  • Guild.ban/unban do not function with IDs of users that aren't cached (6c6da43)
  • Userbots can't set avatar or username (#697, #700, fbcea23, 9308d2e)
  • Various Guild properties get set to undefined (718f61a)
  • GuildMember.nickname gets set to undefined (#703, 7957bc8)
  • channelCreate is emitted twice (#698, f7e89f6)
  • TextBasedChannel.sendCode breaks when content contains codeblock characters (0405b1a)
  • Split messages may not reject on failure (2553117)
  • User.equals not functioning properly (#701, 69f947d)
  • Default permissions no longer accurate (74b9e5d)
  • ClientDataResolver.resolveFile fails horribly on nonexistent files (#717, a2778d4)
  • VoiceConnection.playConvertedStream does nothing (f383c78)
  • Message.cleanContent errors in DMs/Group DMs (#725, fa18b0c)
  • Comply before new rate-limit stuff (yet again, it changed) (aef0b83)
  • Login now rejects if we can't log in (bd1449b)

9.2.0

12 Sep 17:37
Compare
Choose a tag to compare

Additions

  • burst request mode, see this issue (#656, e75dd26)
  • MessageOptions.split to split long messages into multiple messages within the character limit (#653, 7da00cf)
  • StreamDispatcher.time and StreamDispatcher.totalStreamTime (#674, 8c0685f)
  • StreamDispatcher#start event (8f1216d)
  • VoiceReceiver.destroy/recreate (95369b0)
  • Client.fetchInvite (3dab19a)
  • TextChannel.members to see which members can see the channel (#670, c6aa162)
  • User.typingIn/typingDurationIn/typingSinceIn (c405d67, 5dd25ac)
  • EvaluatedPermissions.raw (#682, 6887977)
  • EvaluatedPermissions.hasPermissions (7933d75)
  • Role.hasPermissions (38c85dc)
  • GuildMember.hasPermissions (9e05cae, ebaaa65, 774b4d4)
  • GuildMember.permissionsIn (3fba721)
  • TextBasedChannel.sendCode (#625, 7ff9ac2)
  • Collection.find with a function parameter (ac1f5f3)
  • Collection.findKey (9560586)
  • Message.toString (ce6cb62)
  • ChannelResolvables now accept Guild and Message objects (3fba721)

Fixes

  • Preemptive rate-limiting is now stricter to avoid unlikely 429s (8941157, d7bf40c)
  • Potential error when Discord sends a typing event for a non-text-based channel (fd56417)
  • DMChannel doesn't cache the recipient user (3f52ba2)
  • GuildMember.hasPermission doesn't take guild ownership into account (3e39861)
  • Member nicknames don't get updated (48f84c6)
  • Avatars being set to undefined (5b8f882, f0a9a13)
  • guildMemberAdd triggers for presence updates where members were not previously cached (#684, af33b2b)
  • Voice problems:
  • User properties sometimes randomly get unset (f0a9a13)

9.1.1

10 Sep 13:31
Compare
Choose a tag to compare

Fixes

  • Members are recreated after leaving/being kicked from a guild (#667, 84fe65e)
  • guildMemberAdd is fired for each member in a guild upon instantiation (#668, 9b45294)
  • There is a delay between playing audio streams (#632, f192d16)
  • Multi-part data when sending files breaks (#675, 4255dcd)
  • Audio streams play at an abnormal rate after pause/resumes, and also play abnormally fast when starting (#672, 0d417b6)

9.1.0

09 Sep 16:37
Compare
Choose a tag to compare

Additions

  • Collection and Shard exports for external use (799054d)
  • Collection.some/every, and improved .filter/map (594836b)
  • Client.emojis (bcab880)
  • Client.status to get the websocket status (6dfe160)
  • ClientOptions/MessageOptions.disable_everyone to prevent accidental mentions (3b7d5e8)
  • ClientUser.setStatus streaming URL parameter (db9d5b8)
  • TextBasedChannel.fetchMessage to fetch a single message (48e7fad)
  • TextBasedChannel.sendFile content parameter (9888cef)
  • TextBasedChannel.sendMessage and Message.edit with arrays for the content (automatically joined with newlines) (9f0db9d, f328640)
  • Message.cleanContent with mentions replaced by plain text (9bef99c, bbc9df0)
  • Message.isMentioned (bf3c283)
  • Message.edits with a history of all edits (17bee80)
  • MessageEmbedAuthor (bd113ee)
  • Guild.fetchMember to retrieve a single guild member (user must be cached first) (c7b4cf3, 465ff07)
  • Guild.defaultChannel (9bdf670)
  • Guild.ban to ban a non-member (9d694d2)
  • Guild.createRole data parameter to create a role and immediately update it with the given data (e1bda86)
  • GuildMember.addRole/addRoles/removeRole/removeRoles (dc7b070)
  • GuildMember.permissions and GuildMember.hasPermission for the permissions of a member with their roles only (57acd4f)
  • Channel/Emoji/Guild/Role/User.creationDate (943767d, 7fea0a3)
  • StreamOptions for various voice methods (f7a542f)
  • Improved ShardingManager (2c6b804)
  • Made the client property on most structures non-enumerable, so it won't display in console.log or util.inspect
  • Loads of internal organisation and cleanup
  • Lots of documentation updates

Fixes

  • fetch_all_members doesn't work for newly joined guilds (b9caa2e)
  • max_message_cache default doesn't match the docs (7fe032c)
  • User.bot is inaccurate (#657, 85fae72)
  • User.game is not reset when a user stops playing (#666, dbaaa8d)
  • Role.edit always throws an error (ab4707f)
  • @everyone permission overwrites not being taken into account (978cf9d)
  • Potential issue when guild members are updated (8f04fae)
  • EPIPE error when skipping songs (#635, 47a164b)
  • Handle WS error events silently (#607, dd62389)

9.0.2

04 Sep 13:17
Compare
Choose a tag to compare

Library completely rewritten, please see documentation for upgrading advice.

8.1.0

01 Aug 22:32
Compare
Choose a tag to compare

Additions:

  • Preemptive ratelimiting (prevents most 429 IP bans unless you have a lot of shards)
  • Added support for notes
  • Added support for message pinning
  • Added support for getting a single message (for OAuth bot accounts only)
  • Added more detailed error messages when closing gateway connections
  • Added voiceSpeaking event
  • Added tonicdev support
  • Added support for getting details on an OAuth app (bot account must be owner or member of the app)

Fixes:

  • Fixed a bug where some voice states wouldn't update
  • Fixed some more voice crashes
  • Fixed some game changes not firing presence updates
  • Fixed crash bugs
  • Fixed Discord.Constants export bug
  • Fixed removal of Cache items
  • Fixed editing channels

Misc:

  • Documentation fixes
  • Documentation page for examples
  • Enabled autoReconnect by default

8.0.0

09 Jun 03:32
Compare
Choose a tag to compare

Additions:

  • Added support for nicknames
  • Added support for role and channel mentions
  • Added support for Twitch/YouTube stream games
  • Added support for ADMINISTRATOR, CHANGE_NICKNAME, and MANAGE_NICKNAMES permissions
  • Added support for bulk delete
  • Added error event to VoiceConnection
  • Added guildCreateTimeout for slow internets
  • Added voice connection timeout
  • Added support for voice channel bitrates and user limits
  • Added Message.server (shortcut to Message.channel.server)
  • Added permissionsOf(role) support
  • Added createdAt properties to some objects with IDs
  • Added voiceSwitch event
  • Added disableEveryone option
  • Added /tmp to possible TokenCacher directories

Fixes:

  • Fixed friends-related crashes
  • Fixed permissionsOf crash
  • Fixed sendFile content resolution
  • Fixed autoReconnect loop
  • Fixed selfbots blocking mobile push notifications
  • Fixed incorrect documentation
  • Fixed incorrect role data
  • Fixed old references to self_mute/self_deaf
  • Fixed invalid cache data crash
  • Fixed invalid server member data crash
  • Fixed permissionsOf calculation errors
  • Fixed lastMessageID not being updated
  • Fixed mention resolver crash
  • Fixed user avatar updates
  • Fixed some roles being null
  • Fixed playArbitraryFFmpeg
  • Fixed UDP close errors on VoiceConnection
  • Fixed incorrect bot properties
  • Fixed some zombie FFmpeg proccesses
  • Fixed leaving servers
  • Fixed incorrect server data
  • Fixed updateChannel sending invalid data
  • Fixed logout for bot accounts
  • Fixed potential binary crash while joining voice channels

Misc:

  • Upgraded some dependencies
  • messageUpdated now fires even if the original message is not found

7.0.1

09 Jun 03:18
Compare
Choose a tag to compare

Additions:

  • Added sending file via sendMessage
  • Added updateServer
  • Added autoReconnect

Fixes:

  • Fixed ratelimiter
  • Fixed incorrect documentation
  • Fixed sendFile
  • Fixed voice state update crash

7.0.0

16 Apr 03:29
Compare
Choose a tag to compare

Additions/Changes:

  • Basic support for new OAuth bot accounts
    • Login via loginWithToken(INSERT_OAUTH_BOT_TOKEN_HERE)
    • Public bots (bots that can be invited to other servers) must be converted to OAuth bot accounts by May 1st
  • Friends support (OAuth bots can't have friends though)
  • Encrypted voice support
  • Pause/resume voice stream support
  • Muting/deafening/unmuting/undeafening users support

Fixes:

  • High CPU usage fix
  • Potential playXXX() error fix
  • Voice volume fixes
  • Some voice error fixes
  • Node 0.12 crash fix
  • Fixed forceFetch for guild stream (ready will take much longer though, thanks Discord Devs)
  • Fixed overwritePermissions wiping existing permissions