- Rename Guild#updateChannelPositions -> setChannelPositions
- Allow Guild#setChannelPositions to take ChannelResolvables
- Prioritise ClientDataResolver#resolveChannel's string case
- Minor cleanup
* Adding resetGame functionallity
`setGame` method would allways result in an Object passed to `setPresence`.
Passing { game: null } (supported by discords WebSocket gateway to reset the current Game) to `setPresence` would still result in a Game Object sent to the endpoint.
Explicitly setting `game` to null should overwrite the `game` object provided by `localPresence` or `client.presence`.
This was neither supported by `setGame` or `setPresence`.
* Missing semicolons to resetGame and setPresence
* Fixing trailing spaces, commas and semicolons
* Moving resetGame functionality into setGame method
Minification of if statement in setPresence.
Removing resetGame method and adding a case for `game === null` to setGame method
* Adding missing space in setGame method
* Fix docs
* Adding shuffleArray method to utils
* Shuffle channels functionality on guild.
* Comment fix
* Removing shuffle functionality and replacing with a simple update
* Code review changes to method/variable names
* Update comment reference to channelId as well
* Updating jsdoc with typedef of ChannelPosition
* VoiceConnection rework
- improves codebase
- removes concept of pending connections
- attempts to fix memory leaks by removing EventEmitter listeners
- makes voice connections keep track of its own channel when it is moved by another user
- allows voice connections to reconnect when Discord falls back to another voice server or a region change occurs
- adds events for some of the aforementioned events
* Removed unused code
* More clean up / bugfixes
* Added typedefs to Status and VoiceStatus constants
* Add RichEmbed#attachFile
Mostly for attaching local images that can be accessed within the embed image/author icon/footer icon via `attachment//filename.png` and the like.
* Update docstring to reflect valid param types
* Update TextBasedChannel.js
* Update RichEmbed.js
* Update RichEmbed.js
* Added support for adding users to guild
added RESTMethods#AddGuildMemberOptions and Guild#addMember with typedef
AddGuildMemberOptions to be able to add user to guild as a member
through `PUT/guilds/{guild.id}/members/{user.id}`
https://discordapp.com/developers/docs/resources/guild#add-guild-member
* fixing lint errors
* Changes based on discussion
* Changes based on discussion 2
* Changes based on discussion 3
Yay! More changes.
* Fix for incorrect oldMember in guildMemberUpdate event after addRole
`addRole` would modify the cached GuildMember rather than letting it be handled internally when a guild member update packet is received from Discord, leading to the `oldMember` and `newMember` being identical following a call to `addRole`
This is currently how `addRoles` does it, and a correct oldMember is passed to the `guildMemberUpdate` event following a call to `addRoles`
* Return cloned member with added/removed role
So we can return a member object with the added/removed role without affecting the member object sent to `guildMemberUpdate`
* Wait for guildMemberUpdate and return updated GuildMember
* Fix linter errors
* Remove listeners after 10 seconds