Commit Graph

1064 Commits

Author SHA1 Message Date
Programmix
76637ed10d Fix VoiceDispatcher docs (#1214) 2017-02-23 21:42:41 -05:00
Amish Shah
70b35c85d6 Merge branch 'indev-prism' 2017-02-23 20:19:26 +00:00
Programmix
bf25caf3d3 Updated VoiceConnection to use new Util class (#1210)
pls @Gawdl3y pls
2017-02-22 22:10:26 +00:00
Amish Shah
b55e6927e9 merge fix 2017-02-22 20:39:21 +00:00
Amish Shah
8a2ec437e5 Merge branch 'master' into indev-prism 2017-02-22 20:37:59 +00:00
Gus Caplan
4c9d8d6cd7 add lots of group dm features (#1208)
* group dm stuff

* minor doc changes
2017-02-22 20:33:20 +00:00
Joschua Schneider
5c2086b351 Allow presence updating to allow null games (#1186)
* 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
2017-02-22 20:24:39 +00:00
lipgloss
f068010e96 Implement 'Modify Guild Channel Positions' (#1198)
* 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
2017-02-22 20:24:05 +00:00
Programmix
7fd94c29d8 VoiceConnection rework (#1183)
* 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
2017-02-22 20:13:52 +00:00
Gus Caplan
566135d25b move permission stuff to the resolver (#1185) 2017-02-22 20:11:11 +00:00
Programmix
eb069d0249 Added volumeChange event to VoiceInterface (#1207)
VoiceBroadcast relies on this event to initialize a new Opus engine
2017-02-22 20:10:19 +00:00
Gus Caplan
61e12c637b Add support for more OAuth features (#1203) 2017-02-22 20:09:40 +00:00
Programmix
d09dfa4c37 Capitalize channel type constants (#1209) 2017-02-22 20:08:47 +00:00
Schuyler Cebulskie
b0338df7db Add more required permissions to Guild#addMember 2017-02-21 15:09:46 -05:00
Schuyler Cebulskie
8d1bc30e40 Clean up dd6dd6f 2017-02-21 15:07:54 -05:00
Zack Campbell
db5259cdf1 Add RichEmbed#attachFile (#1202)
* 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
2017-02-21 14:29:37 -05:00
Gus Caplan
d4a84915e6 Add timeout/interval methods to WebhookClient (fixes #1181), and clean up docs (#1204)
* fix up 1181

* Clean up documentation

* Update WebhookClient.js
2017-02-21 14:16:41 -05:00
Schuyler Cebulskie
f2a6c1d98c Improve Client docs a bit more 2017-02-21 14:02:29 -05:00
Kelvin Wu
d870b27ece Message#member should be a nullable. (#1205) 2017-02-21 13:49:20 -05:00
Jamelele
1273bb42ec Doc fixes (#1197)
* Improve ban/unban examples

* Fix example comments

* Replace nondescript 'user' parameter with 'some user ID'

* Update Guild.js

* Update Guild.js
2017-02-19 16:06:18 -05:00
Schuyler Cebulskie
7232531eb1 Move all util methods into class
Remove TransformMessageOptions altogether
2017-02-15 22:25:18 -05:00
Schuyler Cebulskie
b91f8f27be Fix resolveBuffer file failure behaviour 2017-02-15 16:37:31 -05:00
Gus Caplan
ec1ed15c88 Fix request handling (#1180)
* clean up ratelimiters, and disable burst until some big questions are handled

* burst mode is a work

* fix burst again
2017-02-11 12:04:24 +00:00
Mike
dd6dd6fb59 Added support for adding users to guild 2 (#1179)
* 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.
2017-02-08 21:04:39 +00:00
Zack Campbell
2518a0f7e2 Fix for incorrect oldMember in guildMemberUpdate event after addRole (#1129)
* 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
2017-02-08 17:38:57 +00:00
Will Nelson
cdb911f2af update setImage documentation (#1177) 2017-02-08 17:18:10 +00:00
Alexander
cc3e7b26b1 Add convenience function RichEmbed.addBlankField (#1139) 2017-02-08 17:17:13 +00:00
Gus Caplan
7c8f534a38 add random color (#1175)
* add random color

* Update ClientDataResolver.js

* Update ClientDataResolver.js
2017-02-07 01:19:43 -05:00
Alex
ab5e57d94b Create Emoji requires a base64 data uri (#1154) 2017-02-06 14:19:03 -05:00
Schuyler Cebulskie
d6f17a9319 Merge branch 'master' into indev-prism 2017-02-06 01:54:31 -05:00
Jacob
49944747ae Sodium (#1172)
* Use Native libsodium when available

* add newline

* fix typo of exports

* add to webpack ignore

* Update Secretbox.js
2017-02-06 01:24:54 -05:00
Schuyler Cebulskie
b859ba7639 Increase some documentation detail 2017-02-05 23:00:36 -05:00
Amish Shah
26becb570b Fix #1168 (.hasPermission) 2017-02-04 20:58:39 +00:00
Gus Caplan
59ff1d99ba fix types for snowflakes (#1156)
* fix types for snowflakes

* Update TextBasedChannel.js
2017-02-03 21:37:58 -05:00
Funnbot
0b5eeb08f3 clone topic in channel.clone() (#1157)
* Update GuildChannel.js

* Update GuildChannel.js

* Update GuildChannel.js

* Update GuildChannel.js

* Update GuildChannel.js

* Update GuildChannel.js
2017-02-03 21:37:32 -05:00
Gus Caplan
cee9e4839c fix sending code when you aren't splitting the message (#1162)
* fasguhq4wbyghjehuibh

kjgewqhuilb

* Update RESTMethods.js
2017-02-02 16:21:26 +00:00
Gus Caplan
1e94a9e2a4 serious role position stuff (#1159)
* serious role position stuff

* kill meh

* Update Role.js

* Update Guild.js

* Update Role.js
2017-02-01 22:02:16 +00:00
Schuyler Cebulskie
02c23a8b53 Merge branch 'master' into indev-prism 2017-02-01 15:32:18 -05:00
bdistin
a2d6791cd8 Fix CodeBlock Splitting (#1160)
* Fix CodeBlock Splitting

* fix changes requested
2017-02-01 15:31:57 -05:00
Schuyler Cebulskie
e8ac18489e Merge branch 'master' into indev-prism 2017-02-01 15:29:45 -05:00
Alex
ed42d7bd85 Fix backwards GuildEmojiCreate parameters (#1153) 2017-01-31 00:49:11 -05:00
Gus Caplan
8da915f6a1 expose createDM (#1151)
* expose createDM

* Update User.js

* in v12 we are removing these, kay?

* Update GuildMember.js

* Update User.js
2017-01-30 22:56:14 -05:00
Schuyler Cebulskie
f4724d61b2 Fix #1095 2017-01-30 22:54:37 -05:00
Gus Caplan
565c640bc6 Add role support to emoji creation (#1141)
* add role support to emojis

* specify types
2017-01-30 22:47:27 -05:00
Alex
18729b25c7 Add support to edit emojis (#1142)
* Add support to edit emojis

* Fixes for coding style.

* Add and use guildEmoji constants for updateEmoji

* Just use the Constant

* Fix typo in edit documentation

* Specify property types

* Fix ridiculous typo.

* Update Emoji.js
2017-01-30 22:47:05 -05:00
Programmix
78dafb9480 Properly check whether an Opus engine exists (#1150)
* Properly check whether an Opus engine exists

I think I'm retarded

* Fix eslint error

* Update OpusEngineList.js
2017-01-30 16:38:47 -05:00
Programmix
7ed58f5f7f Added Opus stream support, added volume interface (#1102)
* Added opus stream support, added volume interface

* Remove setImmediate

* Fix weird syntax error

* Most useless commit ever

You're welcome, @PgBiel

* Fix potential memory leak with OpusScript

Emscripten has the tendency to not free resources even when the Opus engine instance has been garbage collected. Thanks to @abalabahaha for pointing this out.

* Typo

* VoiceReceiver.destroy: destroy opus encoder
2017-01-29 19:07:33 +00:00
Programmix
5059c59a31 Message patching: clear mention collections (#1138)
* Message patching: clear mention collections

Fixes #1089
When discord sends an array of mentions, it is a full list of mentions -- therefore, we should clear the old mention collection. The same goes for when we re-analyze the message for channel mentions.

* Use Collection.clear() instead of new Collection
2017-01-29 19:02:54 +00:00
Fiddlekins
6fae17912e Added try catch so that decode errors aren't fatal (#1146)
* Added try catch so that decode errors aren't fatal

* Tweaked the usage of the warn event and updated jsdocs

* Moved method into class for webpack scoping reasons
2017-01-29 18:59:00 +00:00
Digitroinc
448c93615b fix splitting messages #1148)
* fix for issue #1120

* build fix
2017-01-29 18:58:35 +00:00