Discord.io Versions Save

A small, single-file library for creating DiscordApp clients from Node.js or the browser

2.4.0

7 years ago

Major

  • Disconnect client if no pong is received after 15 seconds
  • Destroy system encoder and individual decoders
  • Raise cjopus to ^0.0.4
  • Don't load cjopus until absolutely needed
  • Server#voiceSession added, and audio code changed.
  • Added client.internals.ping getter for the client's ping.

Methods

  • getUser added

Minor

  • Switch to new Buffer from Buffer
  • Don't pull Oauth information if the account is not a bot.
  • Switch endpoints for adding/removing roles.
  • Removed examples for old library version and added a new audio example
  • use strict re-added

Pull Requests

  • #118 Update README-legacy.md
  • #120 Delete User Reaction endpoint added
  • #121 getUser added
  • #126 auto-role.js example created
  • #127 Updated colors.md
  • #130 Delete All Reactions endpoint added

2.0.0

7 years ago

Major

  • discord.io now works in the browser and Node, with no tools!
  • CJOpus Emscripten libopus bindings so node-opus isn't required, still a WIP.
  • new DiscordClient removed, please use new Discord.Client
  • Inline documentation (JSDoc)
  • discord.io update notification removed
  • Logging in with username & password removed
  • Role#color_values moved to Discord.Colors
  • Channel#permission_overwrites changed to Channel#permissions alongside structural changes.
  • Channel permission editing introduced.
  • Deprecated disconnected event removed, please use disconnect.

Methods

  • editChannelPermissions added.
  • getAudioContext now uses (error, stream) as callback arguments.
  • listBans renamed to getBans.
  • listServerInvites renamed to getServerInvites.
  • listChannelInvites renamed to getChannelInvites.
  • serverFromChannel removed.
  • setGlobalRequestDelay removed.
  • setPresence's game property is now an Object that takes name, type and url.

Minor

  • "Using [Encoder]" removed
  • Typings temporarily removed until someone wants to PR them for the new methods.
  • Fixed typing bug in sendMessage
  • Fixed editing servers
  • Added TEXT_EXTERNAL_EMOJIS permission.
  • WebSocket title emitter algorithm changed.
  • large_threshold raisedd back to 250.
  • Use zlib.gunzip instead of zlib.gunzipSync for older Node versions
  • Fix crash when bot is removed from servers
  • Fix WebSocket send method.

Pull Requests

  • #85 Client#editRole fixed
  • #87
    • Updating message cache fixed.
    • Curly braces added in VOICE_STATE_UPDATE
    • Removed unused arguments in prepareAudio
  • #93
    • Fix channel initialization
    • Fix audio handling
  • #94 Set voice channel ID if present.

1.13.0

7 years ago

Major:

Methods

  • getMessage({channelID: "", messageID: ""})
  • pinMessage({channelID: "", messageID: ""})
  • getPinnedMessages({channelID: ""})
  • deletePinnedMessage({channelID: "", messageID: ""})
  • editNote({userID: "", note: ""})

Changes

  • Methods that previously used server, channel, role, or user, now use serverID, channelID, roleID, userID, etc (The former are simply deprecated for the next few releases, then they'll be removed)
  • createDMChannel callback arguments are now (error, response)
  • createServer and editServer do not request the server regions before firing the request (Check the documentation for correct regions)
  • Role.prototype.Permissions moved to Discord.Permissions
  • Methods moved outside of DiscordClient constructor
  • Removed needle as a dependency. Using Node's internal http module. (Looking to remove more deps!) (Multipart was a pain in the ass)
  • Fixed DEPRECATED serverFromChannel method's crashing with some IDs (Please use bot.channels[channelID].guild_id )
  • (Pull Request #75 #76) TypeScript definitions donated (Won't upkeep though, not a TypeScript user)
  • (Pull Request #77) Fixed TypeScript definitions
  • A lot of the internal properties have now been exposed as _property. (They're non-enumerable by design, so you won't see them unless you access them yourself)
  • The ready event now has a 3.5 second wait period before it fires. (Discord uses the same unavailable key for actually down servers and servers you're just waiting for.) (Without this, it would cause ready to never fire if a server is actually down)

Minor:

  • Change login error message
  • Now using internal method send instead of WebSocket#send
  • Typo fixes for errors
  • Internal method checkError renamed stringifyError
  • Library version defaulted when required instead of when Client is instanced
  • Internal audio functions changed heavily to support Node streams in the future
  • inviteURL minor change

v1.12.0

7 years ago

Major:

  • Switch to Gateway v5. Possible side effects, none immediately visible.
  • Created some variables on Client construction (presenceStatus, connected, inviteURL)
  • The library will no longer log Gateway Websocket Disconnected: ${code}. Use the disconnect event:
client.on('disconnect', function(errMsg, code) {});
  • members object created in channel constructor.
  • (Pull Request #69 (hue) ) Fix Client#fixMessage's resolving of channels
  • (Pull Request #71 ) Handle incoming audio only if listener exists

Minor:

  • Library version information moved outside of Client constructor.
  • Introduction of error messages for application-specific WebSocket disconnection codes (4000 - 4999).
  • ffmpeg.js example updated to use token instead of email & password.
  • mp3.js example updated to use token instead of email & password.
  • (Pull Request #70) Logos! Thanks to the talented @Adryd, discord.io now has a logo image thing. Orientation may change.