A small, single-file library for creating DiscordApp clients from Node.js or the browser
cjopus
to ^0.0.4
cjopus
until absolutely neededServer#voiceSession
added, and audio code changed.client.internals.ping
getter for the client's ping.getUser
addednew Buffer
from Buffer
use strict
re-addedgetUser
addedauto-role.js
example createdcolors.md
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
discord.io
update notification removedRole#color_values
moved to Discord.Colors
Channel#permission_overwrites
changed to Channel#permissions
alongside structural changes.disconnected
event removed, please use disconnect
.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
.typing
bug in sendMessage
large_threshold
raisedd back to 250.zlib.gunzip
instead of zlib.gunzipSync
for older Node versionssend
method.Client#editRole
fixedprepareAudio
getMessage({channelID: "", messageID: ""})
pinMessage({channelID: "", messageID: ""})
getPinnedMessages({channelID: ""})
deletePinnedMessage({channelID: "", messageID: ""})
editNote({userID: "", note: ""})
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
DiscordClient
constructorneedle
as a dependency. Using Node's internal http
module.
(Looking to remove more deps!)
(Multipart was a pain in the ass)serverFromChannel
method's crashing with some IDs
(Please use bot.channels[channelID].guild_id
)_property
.
(They're non-enumerable by design, so you won't see them unless you access them yourself)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)send
instead of WebSocket#send
checkError
renamed stringifyError
Client
is instancedinviteURL
minor changeGateway Websocket Disconnected: ${code}
. Use the disconnect
event:client.on('disconnect', function(errMsg, code) {});
members
object created in channel constructor.Client#fixMessage
's resolving of channelsffmpeg.js
example updated to use token instead of email & password.mp3.js
example updated to use token instead of email & password.discord.io
now has a logo image thing. Orientation may change.