Commit Graph

188 Commits

Author SHA1 Message Date
SpaceEEC
a4e5713790 readded docs for Client#error and Client#ready (#1466) 2017-05-05 20:15:06 +02: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
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
Crawl
ac92d2cecc Improve docs a bit 2017-04-30 04:30:44 +02: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
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
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
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
Gus Caplan
5e522e0a2e use LF instead of CRLF (#1392) 2017-04-18 21:43:05 +01:00
Gus Caplan
0d83f80fc0 Fix endless reconnection bug (#1389) 2017-04-17 12:32:26 +01:00
bdistin
c5e2ea7458 Break reconnect loop if you client.destroy in the disconnect event (#1371)
* Break reconnect loop if you client.destroy in the disconnect event

* fix lint/long line?

* God this is So UGLY, why...

* Update WebSocketManager.js

* Update WebSocketManager.js
2017-04-12 06:31:45 +02:00
Gus Caplan
0a56fa0aae websocket cleanup (#1346)
* websocket cleanup

* resume event

* Update Resumed.js

* Update WebSocketManager.js
2017-04-10 20:02:17 +02:00
Crawl
d1d8179460 Revert "add auth session change handling" (#1342)
* Revert "User settings (#1337)"

This reverts commit 801633b970.

* Revert "add auth session change handling (#1339)"

This reverts commit 5d85de0883.
2017-04-06 13:50:31 +02:00
Gus Caplan
801633b970 User settings (#1337)
* user settings bruh

* remove development dump

* emit stuff

* i am so done

* Update ClientUserSettings.js

* modularize

* Update ClientUserSettings.js

* Update Constants.js

* Update ClientUserSettings.js

* Update RESTMethods.js

* Update ClientUserSettings.js

* <.<
2017-04-05 22:03:33 +02:00
Gus Caplan
5d85de0883 add auth session change handling (#1339)
* add auth session change handling

* eek
2017-04-05 21:52:55 +02:00
Amish Shah
970bfffc46 Fix emoji events (fixes #1333) 2017-04-05 17:05:27 +01:00
Schuyler Cebulskie
136cab240d Add new ESLint rules 2017-03-17 01:23:39 -04:00
Gus Caplan
fa609caee2 remove pako (#1258) 2017-03-16 09:15:48 -04:00
Schuyler Cebulskie
7232531eb1 Move all util methods into class
Remove TransformMessageOptions altogether
2017-02-15 22:25:18 -05:00
Gus Caplan
59ff1d99ba fix types for snowflakes (#1156)
* fix types for snowflakes

* Update TextBasedChannel.js
2017-02-03 21:37:58 -05:00
Schuyler Cebulskie
f4724d61b2 Fix #1095 2017-01-30 22:54:37 -05:00
Gus Caplan
87b600f78f switch to os shim for safety (#1136)
* switch to os shim for safety

* Update Client.js
2017-01-26 21:21:43 +00:00
Programmix
c1a5bee61f GuildMembersChunk packet handler hotfix (#1125)
* GuildMembersChunk packet handler hotfix

* Add limit, resolve properly if a query is used

* Document new GuildMemberChunk param
2017-01-24 21:55:36 +00:00
Gus Caplan
306ea97f99 fix guild member fetching edge cases (#1115)
* thx4tipprogrammixluvubye

* consistancy

* make this loop for some reason

* so impatient
2017-01-21 16:37:28 +00:00
Amish Shah
7357fc2163 Update typings and increase performance when not listening for presence updates 2017-01-13 19:15:21 +00:00
Gus Caplan
a3091f5262 Handle 4011 ws event code (#1083)
* 4011

* Update WebSocketManager.js

* smh gawdl3y
2017-01-11 22:59:09 +00:00
Gus Caplan
22b1c425ac add ClientUser.settings (#1041)
* add user settings

* Update Ready.js
2016-12-29 18:58:39 +00:00
Amish Shah
7ede44bc00 Add CloseEvent external 2016-12-29 00:27:40 +00:00
Gus Caplan
8d966932a9 funny (#1030) 2016-12-28 01:42:42 -05:00
Schuyler Cebulskie
84991c767e Improve some Gus shenanigans 2016-12-27 22:30:51 -05:00
meew0
14ba0373eb Fix a small spelling mistake in a debug log 2016-12-27 23:16:30 +01:00
Gus Caplan
779681e88f "knock knock. who's there? ack lol. GET OFF MY PORCH!" (#1023) 2016-12-27 17:31:23 +00:00
Gus Caplan
bac4ccead7 "knock, knock. who's there. discord, lol" (#1021) 2016-12-27 12:13:57 +00:00
Gus Caplan
b79533e373 correctly handle invalid session (#1020)
* correctly handle invalid session

* give discord some time, use it wisely
2016-12-27 00:04:09 +00:00