Commit Graph

714 Commits

Author SHA1 Message Date
Gus Caplan
7934788c10 you can't mutate a socket event in some browsers (webpack fix) (#1512) 2017-05-21 05:19:53 +02:00
Gus Caplan
4422f2aa8a fix infinte loop issue (#1488) 2017-05-14 19:33:04 +02:00
aemino
ff82297073 GuildMember#setVoiceChannel fix (#1482)
Looks like someone forgot to remove the full channel object from the PATCH payload.
2017-05-12 06:41:40 +02:00
Drahcirius
d11a658f40 invalid token errors not rejected properly (#1478)
* ready event will now throw errors properly

* ws login rejection fix
2017-05-10 11:14:39 -04:00
SpaceEEC
e66fa145d2 fix fetchMentions' auth header, options and data mapping (#1457)
* fix fetchMentions' auth header, options and data mapping

* vscode strikes again

* switched to Util.mergeDefault

* vscode

* removed duplicated optionals and switched to instanceof
2017-05-06 01:04:12 +02:00
SpaceEEC
a4e5713790 readded docs for Client#error and Client#ready (#1466) 2017-05-05 20:15:06 +02:00
Anxeal
ac5d4d1050 Fix typo in RESTMethods.js (#1455)
Mentions should be written with a capital M
2017-05-03 20:35:24 +01:00
Anxeal
3d92c6d316 Fix typo in RESTMethods.js (#1454)
fetchMeMentions -> fetchMentions 🤔
2017-05-03 19:45:51 +01:00
Cody A. Taylor
e124ada962 Document flattenErrors keys param (#1447)
* Document flattenErrors keys param.

* Remove parens.

* Capitalise a letter
2017-05-01 20:49:45 +01:00
aemino
2bf8a36077 Allow await endpoint stage to not error (#1444) 2017-05-01 18:01:28 +01:00
Amish Shah
c48f042785 silly hydar 2017-05-01 15:42:47 +01:00
Amish Shah
b8018d4b6d Reconnect on 1000 if client didn't close 2017-05-01 15:32:40 +01:00
Amish Shah
51a2e465bd Let client know who closed the WebSocket 2017-05-01 15:24:02 +01:00
Drahcirius
166161d6d3 ready event will now throw errors properly (#1440) 2017-05-01 08:43:35 +01:00
Amish Shah
892ba67d71 Emit packet handling errors to the error event and not the debug event 2017-05-01 07:56:13 +01:00
SpaceEEC
c5efa985fc Readding Client#disconnect and docs for Client#reconnecting (#1437)
* readded docs for client#reconnecting and client#disconnect

* moved disconnect event emitting and clarified emitting reason
2017-05-01 00:16:02 +02:00
Amish Shah
0754ddbc34 Reset sequence when sessions are invalidated 2017-04-30 22:26:44 +01:00
Amish Shah
e460e5e853 Fix some stuff 2017-04-30 21:01:04 +01:00
Crawl
457b9600f2 Docs consistency plz 2017-04-30 13:16:19 +02:00
Crawl
3cb4aac65a Remove unused util 2017-04-30 13:03:51 +02:00
Amish Shah
edf1a3e7b4 Undeprecate uws and fix support for it 2017-04-30 11:56:24 +01:00
Amish Shah
f20f49388d Simplify data unpack logic 2017-04-30 11:40:16 +01:00
Amish Shah
007b1226c9 Rudimentary support for uws while it is deprecated 2017-04-30 11:36:20 +01:00
Amish Shah
8e5c600227 Make OAuth2Application backwards compatible again 2017-04-30 11:21:48 +01:00
Amish Shah
dd110f4824 Add example for creating VoiceBroadcasts 2017-04-30 11:04:41 +01:00
Amish Shah
81b176cfea BaseOpusEngine should be private 2017-04-30 11:01:26 +01:00
aemino
5cad25ea69 Add Guild#me (#1384)
* Add Guild#me

(also did minor docs cleanup)

* Don't use Guild#member as there's nothing to resolve

* Update ClientDataResolver.js

* Update Guild.js

* Update Guild.js

* Update Guild.js
2017-04-30 04:30:59 -04:00
Crawl
ac92d2cecc Improve docs a bit 2017-04-30 04:30:44 +02:00
Amish Shah
ee37d859a4 dumb ass bug fix 2017-04-29 22:47:06 +01:00
Amish Shah
1a69331f0c Merge branch 'master' of https://github.com/hydrabolt/discord.js 2017-04-29 21:09:56 +01:00
Amish Shah
c40252381b Deprecate all the things 2017-04-29 21:09:53 +01:00
Gus Caplan
4127cf6e40 Experimental support for Audit Logs (#1403)
* start audit logs

* make better var types so gawdl3y doesn't shit on this

* add constructor stuff

* make more changes

* add entry creation

* add methods

* make it all work hopefully

* aaa

* aaaa

* i wish i could test this locally

* fix users, guild when i feel like it

* make guild prop non-enumerable

* make better types

* change nouns

* e

* Update GuildAuditLogs.js

* Update GuildAuditLogs.js

* Update GuildAuditLogs.js

* eek

* Update GuildAuditLogs.js

* Update GuildAuditLogs.js

* friggin trailing spaces

* Update GuildAuditLogs.js

* docs!

* Update GuildAuditLogs.js

* reason stuff

* Update GuildAuditLogs.js

* Update GuildAuditLogs.js

* support before/after for pagination

* Update Guild.js

* Update GuildAuditLogs.js

* mfw using github web editor

* fix build

* Update Guild.js

* amazing cache fuckery shit evil

* cool stuff

* make building audit logs nicer

* ban endpoint stuff

* dox

* <.<
2017-04-29 20:34:57 +01:00
Amish Shah
b0a3528411 sorry gus i borked 2017-04-29 20:00:05 +01:00
Amish Shah
5b2ca326d4 ESLint pls >.> 2017-04-29 18:07:48 +01:00
Amish Shah
f7d65991d5 Minor refactor of Actions 2017-04-29 17:56:36 +01:00
Amish Shah
dd8f77fcf0 Stop the EventEmitter debug warnings when fetching lots of guilds before ready 2017-04-29 17:46:36 +01:00
Amish Shah
584961b04b Debug resume from connection not Client 2017-04-29 15:58:12 +01:00
Amish Shah
2e33bf583e Try to fix StreamDispatchers (#1387) 2017-04-29 15:12:34 +01:00
SpaceEEC
956372731f Using ws.connection.status rather than undefined ws.status (#1429) 2017-04-28 21:27:30 +02:00
Amish Shah
195fcfa15c Rewrite WebSocket internals (#1410)
* Start rewriting Manager and Connection

* more stuff

* stuff

* Fix ready bug

* some stuff i forgot

* fix some stuff

* add stupid heartbeat ack like seriously who cares

* woo!

* fix a bug

* rate limit the dumb websocket

* stuff

* hdocs

* Docs

* Remove ClientManager#setupKeepAlive as it is now redundant

* Change Client._pingTimestamp to a getter that fetches the timestamp from the WebSocketConnection

* are you happy now eslint smh

* make gus happy

* Add CloseEvent external doc

* Make sure to emit 'reconnecting' when actually reconnecting

* ffs

* Fix RESUME logic

* Add heartbeat ack debug messages, including latency data

* Dumb stuff for Gus

* thx eslint

* more dumb stuff

* more dumb crap smh gus i h8 u

* moar messages

* fix for using wrong status, causing certain events not to be fired (#1422)
2017-04-28 16:13:06 +01:00
SpaceEEC
909b825c94 Fixed acknowledging of channels (#1411)
* Fixed acknowledging of channels

* using channel#lastMessageID and resolve when it's not present
2017-04-25 23:29:08 +02:00
Gus Caplan
c670209021 allow search('string here') (#1408) 2017-04-24 16:43:30 +02:00
Crawl
53eda09f72 Improve docs 2017-04-24 16:29:29 +02:00
Amish Shah
26069a44e2 nope i was right the first time 2017-04-22 21:23:20 +01:00
Amish Shah
3465a154d5 that should be 60 tbh 2017-04-22 21:20:50 +01:00
Amish Shah
eec79b5fd0 Increase WebSocket backoff time to alleviate reconnect issues 2017-04-22 21:16:58 +01:00
Skiptir Engu
8475a4abee Use libsodium.js if available (#1390)
* Use libsodium.js if available

* Style consistency

* Added peer dep and update README

* Link should point to npmjs 🤔
2017-04-19 18:35:45 +02:00
Crawl
27114eebf9 Commit those in LF too 2017-04-19 18:17:23 +02:00
Crawl
1897b4f4d6 Commit those in LF 2017-04-19 18:14:37 +02:00
Schuyler Cebulskie
b7e16ad4b8 Revert "use LF instead of CRLF (#1392)"
This reverts commit 5e522e0a2e.
2017-04-18 22:41:08 -04:00