Commit Graph

771 Commits

Author SHA1 Message Date
Gus Caplan
8b8a365e99 fix ratelimits (#1806) 2017-08-20 10:14:38 +02:00
Gus Caplan
55543754b9 proper fix for #1685 (#1805)
* Update WebSocketConnection.js

* Update WebSocketConnection.js

* Update WebSocketConnection.js

* Update RESTManager.js
2017-08-20 05:14:49 +02:00
iCrawl
2aa2f73c74 Docs cleanup 2017-08-17 20:04:01 +02:00
Gus Caplan
5ce0def9d0 fix sync (#1792)
* Update Ready.js

* Update ClientDataManager.js
2017-08-17 18:28:01 +02:00
Gus Caplan
57977b063e channel stuff (#1775)
* channel stuff

* abstract channel creation

* Update Channel.js

* Update Channel.js

* Update Channel.js

* Update Guild.js

* Update Constants.js

* e
2017-08-13 13:57:25 +02:00
Gus Caplan
3ba224900f new application stuff very hype (#1764)
* application stuff, more to come

* docstrings

* Update Message.js
2017-08-11 19:09:06 +02:00
Gus Caplan
3c7869c1b7 update retry case for 5xx (#1765) 2017-08-10 20:31:45 +02:00
SpaceEEC
d9262f2682 Added and fixed a bunch of docs stuff (#1767)
- Fixed a common copy paste fail `the the <thing>` in various places
- Apparently I can't type Resolvable correctly,
Fixed that wherever applicable
- Documented GroupDMChannel#nicks so that it will be displayed on the docs
- GroupDMChannel#icon is nullable
- Removed empty InviteOptions typdef, as its properties are now documented in GuildChannel#createInvite
- MessageMentions#channels is no longer nullable
- RoleData#permissions takes a PermissionResolvable or an array of them
- Webhook#avatar is nullable
- Added HTTPOptions typedef and added it to ClientOptions typedef
- ClientUserChannelOverride#muted is for a channel and not a guild directly
2017-08-10 20:31:10 +02:00
SpaceEEC
87cdad332c Improved Guild#createChannel, added RoleResolvable and fixed a bit of Emoji stuff (#1754)
* Made creating channels with overwrites nicer
and added ClientDataResolver#resolveRole

* Renamed ChannelPermissionOverwrites to ChannelCreationOverwrites

* Added RoleResolvables everywhere possible

* Fixed Emoji#setName resetting restricted roles and Emoji#equals

Which will lead to emojis not to update when roles are being added removed.
2017-08-10 01:22:57 +02:00
Isabella
62fc9fce6d Add Attachment structure (#1731)
* Add Attachment structure

* Fix linter issues + @private

* Fixed array sends, also added embed sends

* fixed proving path to attachment

* fixed incorrect name assumption from path

* linting fix

* ;)

* im really good at this

* changes as requested by gus

and computer from #1459

* am a dum

* update webhook#send

* readonly addition to getters

* i... uh... oops

* farming deez commits

* fix webhook split

* removed some ugly

* removed .every checks
2017-08-06 18:09:47 -04:00
FireController1847
580e066a36 Init pause variable on VoiceBroadcast (#1751)
* Init pause variable on VoiceBroadcast

* Move it back. Could have swore I did this.
2017-08-04 09:21:18 +02:00
Yoson Chiu
ba1c257bb2 Fixes #1693 (#1745)
* Update AudioPlayer.js

* Set timestamp to 0 as well.
2017-08-04 09:18:37 +02:00
Crawl
bda72c60fa CRLF to LF 2017-08-01 04:40:39 +02:00
iCrawl
d4793bae0f Fix tiny doc string 2017-08-01 04:32:29 +02:00
stupid cat
b8034525e3 Add user_guild_settings support (#1365)
* user guild settings

* Use direct collection

* I'm a goof

* double goof

* Structure properties

* Forgot to register listener

* wrong class names

* No more get in docs

* avoid waterfalls, bot checks

* trycatch

wow i thought i already did this :notlikecat:

* 👀

* Update ClientUser.js

* Update ClientUserGuildSettings.js

* Update UserGuildSettingsUpdate.js

* Update ClientUserChannelOverride.js

* Update ClientUserGuildSettings.js
2017-08-01 04:28:15 +02:00
tjpc3
4f5d1bffaf fix node.js crash due to error messages being called with invalid error keys (#1728)
* Comments

* More Comments

* Added new error message

* Fixed error message

* Removing temporary comments

* Fixed error messages

* Added more new error messages

* Removed trailing space

* Removed other trailing space

* Changed error key

* Changed error key used
2017-08-01 04:01:45 +02:00
SpaceEEC
79fed1295c Fixed DiscordAPIError#message sometimes being undefined (#1735) 2017-07-31 01:18:55 +02:00
SpaceEEC
fe8f371d82 Fixed Client#guildMembersChunk's members collection's key being undefined. (#1736) 2017-07-31 01:16:50 +02:00
Gus Caplan
0acb0ac5dc fix unpack weird issues (#1729) 2017-07-29 22:02:56 +02:00
bdistin
080996b5a9 fix sequential and burst ratelimiters from going on timeout because the queue is empty (#1722)
* create branch for me to work on

* fix sequential and burst ratelimiters from going on timeout because the queue is empty
2017-07-27 02:51:58 +02:00
aemino
e29a3ec08b Handle unexpected disconnects via packets (#1521) 2017-07-26 10:10:21 +02:00
aemino
4342ed29a8 Audio bitrate support (#1439)
* Audio bitrate support

Note: not implemented for VoiceBroadcasts

* Fix default args, auto bitrate

* Late night typos are the best

* Changes bitrate to kbps for VoiceChannel stuff

* Add methods to manipulate bitrate while encoding
2017-07-26 10:06:40 +02:00
Will Nelson
7eb9e65c41 check guild availability when aggregating client emojis (#1711) 2017-07-26 10:04:43 +02:00
Gus Caplan
57b6980313 retry on 500 (#1709) 2017-07-22 23:21:50 +02:00
Gus Caplan
a2eeafc75d rewrite ratelimiting and api route builder (#1667)
* rewrite ratelimiting and api route builder

* more stuff

* let people pass their own handlers

* Update burst.js

* Update RequestHandler.js

* Update burst.js

* Update sequential.js

* Update RequestHandler.js
2017-07-21 02:32:40 +02:00
SpaceEEC
11556c0b3b Moved all error strings to src/errors/messages and a few other things (#1695)
* Added missing error messages
As well as `Guild#setRolePosition` and `Guild#setChannelPosition`'s first arg validation
And fixed a typo in `Guild#setChannelPosition`
`roles` -> `channels`

* Reverted collection and Util constructors

* Removed leftover messages
Should have been in the second commit.

* It's a single invalid permission and removed unused flag error

* Fix INVALID_TOKEN -> TOKEN_INVALID as of #1703
2017-07-21 02:27:19 +02:00
Raphael
111fa2da93 Fix typo in client.voiceConnections docs (#1679)
Fix typo in client.voiceConnections docs
2017-07-11 05:42:14 +02:00
SpaceEEC
c0e9ce2a1d functions for setTimeout should get the context bound and not applied (#1673) 2017-07-10 03:34:54 +02:00
Crawl
0c34f3a313 Update dependencies & make webpack great again 2017-07-05 11:53:53 +02:00
Gus Caplan
e3cd000ec0 update http options to fit discord spec (#1656)
* Update Constants.js

* Update APIRequest.js

* Update Invite.js

* Update Constants.js
2017-07-05 09:10:06 +01:00
Gus Caplan
2eb3720001 move raw call so that any cache events happen before (#1653)
* move raw call so that any cache events happen before

* Update WebSocketConnection.js

* Update WebSocketConnection.js
2017-07-04 00:10:28 +02:00
aemino
afcf43aef6 Add VoiceConnection errors (#1649) 2017-07-04 00:09:38 +02:00
bdistin
8da557faab Fix client.fetchApplication (#1644)
previously it returned: `this.api.oauth2.applications was not a function`, missed fixing with the api router change
2017-07-02 01:33:21 +01:00
aemino
62537b7deb Ignore setSpeaking requests when VC isn't connected (#1638) 2017-07-01 10:14:41 +01:00
Gus Caplan
5ecd5f7d69 REST API speed improvement (#1577) 2017-07-01 10:14:17 +01:00
Gavin Wainwright
7b44262346 Destructure certain imports (#1634) 2017-06-29 00:43:26 +01:00
Drahcirius
45cc175851 setTimeout should use args (#1623) 2017-06-27 20:22:17 +01:00
Will Nelson
0a337a4646 make token not enumerable (#1620) 2017-06-25 20:48:30 +01:00
Gus Caplan
63e54982f4 Errors Standardization (#1246)
* errors and stuff

* more errors

* all the errors

* fix build
2017-06-25 18:48:05 +01:00
Gus Caplan
602fe06f88 update docs for discord api error (#1575)
* aaaaa

* Update DiscordAPIError.js
2017-06-24 23:36:48 +01:00
aemino
4ae4c97589 Fix VoiceConnection#authenticateFailed race condition (#1601) 2017-06-24 23:28:49 +01:00
SpaceEEC
201ecd25a2 renamed OAuth2Application#reset to resetSecret and added resetToken (#1541) 2017-06-24 23:26:09 +01:00
Gus Caplan
66cc5b2b53 URI Encoding for reasons (#1606) 2017-06-17 10:47:37 +01:00
Amish Shah
b694ab1b80 Add internal sharding options 2017-06-11 11:36:58 +01:00
SpaceEEC
d6041f9fb3 Added Client#status and Message#type typedefs (#1571)
* typedef for MessageTypes and linked Client#status to Status

* should be singular

* typedef for Voiceconnection#status
2017-06-09 16:27:49 +02:00
aemino
4e79a885b8 Remove unused VoiceBroadcast#guaranteeOpusEngine (fixes #1556) (#1563) 2017-06-05 06:52:31 +02:00
Gus Caplan
a2520efa1a Use node 8 error code (#1557) 2017-06-01 21:14:42 +02:00
Gus Caplan
63f5652ac2 object.entries (#1549)
* Update DiscordAPIError.js

* Update ClientUserSettings.js
2017-06-01 10:38:34 +02:00
aemino
c4a7ce12e6 Opus engine fetching: don't ignore non-missing errors (#1555)
* Opus engine fetching: don't ignore non-missing errors

* typo fix
2017-06-01 10:29:55 +02:00
Amish Shah
6cc74d22ff fml 2017-05-30 12:22:40 +01:00