github discordjs/discord.js 9.3.0

latest releases: @discordjs/core@1.1.1, @discordjs/rest@2.2.0, 14.14.1...
7 years ago

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)

Don't miss a new discord.js release

NewReleases is sending notifications on new releases.