Commit Graph

216 Commits

Author SHA1 Message Date
SpaceEEC
ec4c98704f refactor: make use of destructuring for Constants (#1942) 2017-09-16 20:31:36 +02:00
Isabella
0607720ec8 docs: improve documentation (#1898)
* improve channel documentation

* forgot some stuff

* another one

* im good at this

* i did a dum
2017-09-08 02:01:35 +02:00
Gus Caplan
675e1eccb1 Separate websocket internals for RPC (#1893)
* websocket centralization

* more centralization

* whoops

* Update WebSocket.js
2017-09-06 07:20:10 +01:00
Amish Shah
37d84b14f8 Re-add VoiceChannel#members and messageUpdate to the documentation 2017-09-05 11:16:56 +01:00
SpaceEEC
87fa74acd4 ClientUserGuildSettings: avoid uncaught exception and a bit of refactoring (#1885)
* refactor(ClientUserGuildSettings): make client first parameter of the constructor

* refactor(ClientUserChannelOverride): patch if possible rather then reinstantiating every update

* fix(ClientUserGuildSettings): avoid uncaught exception when patching newly joined guilds/gdms
2017-09-05 02:40:46 +02:00
Gus Caplan
c4df2502ec Rewrite presence a little bit (#1853)
* such presence many good

* Update PresenceStore.js

* Update index.js

* Update ClientPresenceStore.js

* Update Presence.js

* Update ClientPresenceStore.js

* Update ClientUser.js

* Update Presence.js

* add timestamps and party

* Update Presence.js

* Update PresenceStore.js

* Update ClientPresenceStore.js

* Update ClientPresenceStore.js
2017-09-02 23:57:02 +01:00
SpaceEEC
65d9d46a3c Fixed DataStore, deprecation leftovers and a bit of Event Constants (#1841)
* Fixed leftover fetchThing and removed unused methods/error messages

* Added resume event constant and used event constants wherever possible

* Replaced mentions of removed method name with their new name.

* Fixed typo: resume -> resumed
2017-08-28 00:11:28 +02:00
iCrawl
3c532f16bc Remove unused Util require 2017-08-26 16:12:18 +02:00
Amish Shah
30dd3e0cff Fix #1684 2017-08-26 13:43:13 +01:00
Amish Shah
51fe80fd11 fix fetching all members 2017-08-26 13:08:54 +01:00
Amish Shah
170f687d81 actually fix that delete thing (#1507) 2017-08-26 00:08:12 +01:00
Amish Shah
b8315b79c7 Store and Model Refactor (#1618)
* UserStore refactor

* Create ChannelStore, remove redundant methods in ClientDataManager

* Create GuildStore

* Emoji stuff

* Use a Base class where possible to reduce code duplication

* Remove unnecessary comments from ChannelStore

* Add Base._clone();

* Remove unused ClientDataManager methods

* Refactor some more stuff

* ESLint

* Move Client#fetchUser to client.users.fetch

* Remove .has checks and just see if .get is truthy

* Fix guild member chunk error

* ESLint

* Fix typo

* Fix channel storing for user bots

* Remove ClientDataManager

* GuildChannelStore

* Reduce use of Util.cloneObject

* and this one too

* update typings

* Fix MessageUpdate handling (#1507)

* Fix role updates (probably fixes #1525)

* fix for eslint

* Address some of appell's comments

* Use debug constant

* start message store crap if it's ugly tell me later k

* fix that

* message store but works™️

* clean up guild stuff

* clean up channel store stuff

* clean up channel event handling

* does this message stuff work? find out soon in the next episode of dIsCoRd.Js

* eslint

* emojis

* emojis and reactions

* hi my name is eslint and im A LIL SHIT

* so i forgot this huh

* user stuff

* Fix @class

* Fix message stuff

* Fix user store docs

* Document all the bases

* fix the super things

* tidy up remove

* fix textbasedchannel

* fix that too

* fix emoji store

* make voice state stuff less ugly

* make voice states even less ugly

* make members less bad

* fix bug

* fix that too

* fix reactions

* how was this broken for so long

* role store

* remove super._patch from UserConnection

* Rename UserProfile#setup to _patch

* remove unnecessary super calls

* update docgen dep (pls fix travis thx)

* doc messagestore

* fix docs

* message store docs

* things

* DOCS PLS

* more things

* Document TextBasedChannel#messages as a MessageStore

* Rebase

* All the stores!
2017-08-25 21:08:58 +01:00
Gus Caplan
b055dae998 make webpack over 9000 times better (#1816)
* webpack stuff

* even better

* Update browser.js
2017-08-22 19:55:28 +02:00
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
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
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
SpaceEEC
c0e9ce2a1d functions for setTimeout should get the context bound and not applied (#1673) 2017-07-10 03:34:54 +02: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
Gavin Wainwright
7b44262346 Destructure certain imports (#1634) 2017-06-29 00:43:26 +01:00
Amish Shah
ee679c7320 Fix #1528 2017-05-27 19:19:35 +01:00
Gus Caplan
694f8278f1 make fetching members way better (#1124)
* make fetching members way better

* fix up fetching edge cases yet again

* stop making useless collections

* Update Guild.js

* Update Guild.js

* consistency?

* Update GuildMembersChunk.js

* Update Guild.js

* Update Guild.js

* Open editor to fix issues instead of GH: check
2017-05-21 22:09:37 +02:00
Gus Caplan
7934788c10 you can't mutate a socket event in some browsers (webpack fix) (#1512) 2017-05-21 05:19:53 +02:00
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