Commit Graph

111 Commits

Author SHA1 Message Date
Amish Shah
edf1a3e7b4 Undeprecate uws and fix support for it 2017-04-30 11:56:24 +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
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
64b378f7d4 Update sharder test 2017-04-22 19:47:22 +02:00
Amish Shah
970bfffc46 Fix emoji events (fixes #1333) 2017-04-05 17:05:27 +01:00
Crawl
2ff1f3dcde Update sharder.js 2017-04-02 09:45:59 +02:00
Gus Caplan
cb3f6d9646 http rewrite (actually works this time!!1!) (#1257)
* rewrite http

* browser fun

* all the mimes dammit

* i need a newline

* whoops

* forgot about this

* use promises and HTTPRequest.method

* fluent

* move httpclient to external module

* branding

* middleware

* revert middleware
2017-04-01 09:04:01 +02:00
Amish Shah
bace8bcac2 make broadcast not suck as much 2017-01-07 19:38:05 +00:00
Amish Shah
91fc6ccb5c VoiceBroadcasting much more efficient 2016-12-30 13:57:09 +00:00
Amish Shah
72a99f9582 start work with broadcast streams 2016-12-29 21:22:13 +00:00
Amish Shah
4541b3e264 Simplify check in StreamDispatcher and add test voice bot 2016-12-29 16:10:51 +00:00
Amish Shah
e7824d6515 Fix weird audio playback bug between subsequent streams on an AudioPlayer 2016-12-28 23:21:34 +00:00
Amish Shah
00254f35b0 Make voice return streamdispatcher 2016-12-28 21:40:11 +00:00
Amish Shah
cd657be8be Add functionality for GuildEmoji events 2016-12-26 19:21:00 +00:00
Amish Shah
544e456302 Add ClientOptions.restTimeOffset for better performance for bots with a good network connection 2016-12-24 12:13:42 +00:00
Slamakans
b79a91b3a9 new errors for richembed yay (#966)
* Update faq.md (#949)

* fix docs

* Revert "fixed typo in documentation" (#950)

* new errors for richembed yay

Simplified the parsing for color arrays.

Throwing some errors on values that would result in Bad Requests.

Changed setAuthor and setFooter's icon parameter to icon_url to match
the embed object's property name.

Changed the docs for setFooter to reflect that icon_url is optional.

* changed docs instead of arg names

* capitalization
2016-12-09 22:09:55 -05:00
Schuyler Cebulskie
049ab42eb4 Do stuff slightly better 2016-11-20 20:54:40 -05:00
Gus Caplan
2440a4a2c8 Add webpack building (#907)
* friggin webpack tho

* probably important

* add all the stuff to the package.json

* add minify builds and a nice package.json script to run it all

* clean up

* use uglify harmony branch so we can actually run minify builds that work

* update build system

* make test better

* clean up

* fix issues with compression

* ‮

* c++ requirements in a node lib? whaaaaat?

* fix travis yml?

* put railings on voice connections

* 🖕🏻

* aaaaaa

* handle arraybuffers in the unlikely event one is sent

* support arraybuffers in resolvebuffer

* this needs to be fixed at some point

* this was fixed

* disable filename versioning if env VERSIONED is set to false

* Update ClientDataResolver.js

* Update ClientVoiceManager.js

* Update WebSocketManager.js

* Update ConvertArrayBuffer.js

* Update webpack.html

* enable compression for browser and fix ws error handler

* Update WebSocketManager.js

* everything will be okay gawdl3y

* compression is slower in browser, so rip the last three hours of my life

* Update Constants.js

* Update .gitignore
2016-11-20 19:38:16 -05:00
Amish Shah
dd9c291508 Add reaction fetching of users 2016-10-27 16:58:06 +01:00
Amish Shah
81059885a2 Start work on adding reaction support 2016-10-27 15:22:42 +01:00
Amish Shah
1a3ea65abd fix some shard stuff on linux 2016-10-26 20:15:56 +01:00
Amish Shah
7d04863b66 Revert "fix Client.destroy bugs" (#839) 2016-10-26 17:30:18 +01:00
isonmad
e9fa8a438c fix Client.destroy bugs (#828)
* add test for Client.destroy()

* propagate errors in ClientManager.destroy

If the promise returned by logout() rejects, previously
it would be completely uncaught, and just return an
eternally pending promise that never resolved.

* fix RESTMethods.logout

Without a data argument, the POST that superagent sends causes
the discord server to reply with a HTTP 400 error:

text: '{"Content-Type": "Expected Content-Type to be one of set([\'application/json\'])."}',

* fix Client.destroy

_timeouts and _intervals were changed to Set objects in
commit 6ede7a32fd a month ago.

Changing them to arrays causes failures if you try to reuse
the client object again.

* always close websocket in ClientManager.destroy

Invoking logout does not implicitly cause the server to close
the websocket for you, so cleanup everything.

Otherwise the websocket being open keeps node alive and hanging
mysteriously until the connection hits a timeout.

* fix indentation for eslint
2016-10-26 14:49:45 +01:00
Amish Shah
26de908cfd some voice docs 2016-10-26 14:44:19 +01:00
Amish Shah
0c4a4023ce Fix setting guild role positions (#751) 2016-10-26 14:19:36 +01:00
Amish Shah
0f8e8dddff fix presence updating 2016-10-25 21:40:53 +01:00
Amish Shah
91ba59c43d Added voice disconnect 2016-10-25 14:18:20 +01:00
Amish Shah
f96c185d92 add the functions to voice connection 2016-10-24 21:39:32 +01:00
Amish Shah
1a5ce878a1 fix some stuff 2016-10-24 20:13:44 +01:00
Amish Shah
b24e0b347e Merge remote-tracking branch 'origin/indev' into indev-voice 2016-10-24 16:26:41 +01:00
Amish Shah
6093dac554 Fix #776 (guildMemberAdd firing for existing members) 2016-10-24 15:57:07 +01:00
Amish Shah
9d0dd665de fix something 2016-10-24 14:49:01 +01:00
Amish Shah
8dd2005ab9 stop logging 2016-10-24 14:37:08 +01:00
Amish Shah
e13e2447d4 get voice sort of working 2016-10-24 14:26:24 +01:00
Amish Shah
7c26603773 Fix presences probably ¯\_(ツ)_/¯ 2016-10-01 15:27:56 +01:00
Amish Shah
ab15c45d96 fixed role stuff 2016-10-01 11:21:35 +01:00
Schuyler Cebulskie
8d18ed42f6 Update tests 2016-09-27 18:48:54 -04:00
Amish Shah
045153584a redo the client user presence stuff 2016-09-27 17:57:47 +01:00
Amish Shah
534d7af8c3 Fix resuming sessions (fixes #699) 2016-09-25 15:03:54 +01:00
Amish Shah
03651fd6e3 Change how presences are handled 2016-09-25 14:16:03 +01:00
Amish Shah
0e8f1bef97 Stop comparing for equality on update events and just emit for performance 2016-09-25 11:24:02 +01:00
Amish Shah
fbcea236c5 Fix avatars not being set on selfbots - fixes #697 2016-09-13 20:21:12 +01:00
Amish Shah
f7e89f61e6 Fix channelCreate being emitted twice - fixes #698 2016-09-13 20:00:00 +01:00
Amish Shah
36435934c7 documentation v13 2016-09-12 17:36:38 +01:00
Amish Shah
75b01e0a4a add /play to test file 2016-09-12 17:08:56 +01:00
Amish Shah
9059eb13a2 Add passes to streaming voice 2016-09-11 18:49:18 +01:00
Amish Shah
7933d755be Fix docs generator and add EvaluatedPermissions.hasPermissions() 2016-09-11 12:44:31 +01:00
Amish Shah
e75dd2638c Add Burst requests - addresses #656 2016-09-10 22:12:10 +01:00
Amish Shah
c6aa16277a Add TextChannel.members 2016-09-10 17:06:10 +01:00
Amish Shah
7475f734ac Add debug stuff 2016-09-04 12:31:16 +01:00