Commit Graph

168 Commits

Author SHA1 Message Date
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
5e2ee2398e Fix some destroy stuff (#828) 2016-10-26 19:42:21 +01:00
Amish Shah
7d04863b66 Revert "fix Client.destroy bugs" (#839) 2016-10-26 17:30:18 +01:00
Gus Caplan
c6bcf69dc3 added User#fetchProfile (#835)
* add User#fetchProfile

* fix merge conflicts?
2016-10-26 16:23:39 +01:00
Gus Caplan
60a911e4a0 add clientUser#createGuild (#832)
* add clientUser#createGuild merge docs

* almost caused a memory leak!

* muh triggers
2016-10-26 15:59:15 +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
968883ec35 Merge branch 'indev' of https://github.com/hydrabolt/discord.js into indev 2016-10-26 14:19:39 +01:00
Amish Shah
0c4a4023ce Fix setting guild role positions (#751) 2016-10-26 14:19:36 +01:00
Schuyler Cebulskie
c96d5ad30e Optimise everyone/here replacing 2016-10-25 19:01:56 -04:00
Amish Shah
21533eec5b fix banning probably hopefully 2016-10-23 20:51:04 +01:00
Gus Caplan
422b90c711 add way more friend shit (#815) 2016-10-22 16:25:55 -04:00
Gus Caplan
9c8eb2dfc3 lets all be friendly! (#809)
* lets all be friendly!

* fix doc

* Update ClientUser.js

* Update ClientUser.js
2016-10-18 01:36:25 -04:00
Schuyler Cebulskie
0b5ef296cb Fix split messages resolving with multiple of the same message 2016-10-15 20:23:32 -04:00
Schuyler Cebulskie
8f0e2e0c56 Make token "Bot" removal more lenient
In case of heavy user error. :)
2016-10-14 02:14:00 -04:00
Schuyler Cebulskie
e4636243b2 Improve token "Bot" removal 2016-10-14 02:11:31 -04:00
Gus Caplan
853a3dfa04 Add getRecommendedShards and automatic shard count in ShardingManager (#796)
* draft stuff

fix docstring for Client#token

Reorganise resolver

make env better for shards, clean up docs

Fix Gus' log messages

7

meh just gateway/bot not v7 :(

final changes, ready for mergin!

build docs

make default totalShards 'auto', fix docs for totalShards type

clean up docs more

run docs

* make consistancy real

* Update and rename getRecommendedShards.js to GetRecommendedShards.js

* Update GetRecommendedShards.js

* Update index.js

* Update RESTMethods.js

* Update Shard.js

* Update GetRecommendedShards.js

* Update ShardingManager.js

* run docs
2016-10-13 23:26:10 -04:00
Gus Caplan
32eeb8ad5e Fix feature/login (#790)
* eeeeeeee

* too tired

* ok gawdl3y

Signed-off-by: Gus Caplan <fluffyrobotcheese@gmail.com>
2016-10-10 02:55:09 -04:00
Gus Caplan
5ddefc3682 fix webhook#edit (#789)
* fix webhook#edit

* hehe
2016-10-10 02:54:46 -04:00
Gus Caplan
e48d7d52f1 add webhook#sendSlackMessage (#788) 2016-10-10 01:56:18 -04:00
Schuyler Cebulskie
29b33bffaa Rearrange and clean up more webhook stuff 2016-10-09 15:50:50 -04:00
Gus Caplan
1c4ed4547f adds new WebhookClient and allows you to fetch channel webhooks and such without being "over the top" (#768)
* start blocking out client

* proto webhookclient

* wee working webhooks

* it's all working

* run docs

* fix jsdoc issues

* add example for webhookClient

* add example in the examples place

* fix docs
2016-10-07 19:09:41 +01:00
Schuyler Cebulskie
77e37b62ef Fix sendMessage with no content and split/disableEveryone 2016-10-02 11:14:32 -04:00
Schuyler Cebulskie
8945344a3b Improve role position updating (allows for <=0) 2016-09-30 22:51:37 -04:00
Schuyler Cebulskie
c2c477834f Add Role.setMentionable 2016-09-30 22:48:25 -04:00
Schuyler Cebulskie
543e814f8e Move protocol version to a constant, and reorganise constants a bit 2016-09-30 02:45:16 -04:00
Gus Caplan
aed75e1f9a Add full guild emoji functionality (#749)
* all the emoji stuff

* fix things for hydra 😘

* feck i need to stop committing on github

* update docs again

* Butts
2016-09-27 20:44:09 -04:00
Schuyler Cebulskie
ba8dd3467a Switch config back to camelCase 2016-09-27 18:42:32 -04:00
Gus Caplan
c8761d72de add guild emoji methods (#742)
* add guild emoji methods

* run docs

* crawl pointed out some things about the docs, so i fixed

* actually run the docs on the changes 🤦
2016-09-26 21:39:07 +01:00
Amish Shah
aef0b83c34 comply to the latest rate limit stuff (hammerandchisel/discord-api-docs#108) 2016-09-24 18:19:18 +01:00
Gus Caplan
15d7f8e2fe Add Guild#prune (#723)
* make all changes neat

* run docs build
2016-09-21 15:57:14 -04:00
Schuyler Cebulskie
6a94658dd7 Clean up some stuff 2016-09-19 04:32:24 -04:00
Schuyler Cebulskie
6c6da43da3 Fix ban/unban with IDs 2016-09-18 23:07:30 -04:00
Amish Shah
9308d2ead3 Address #700 2016-09-14 16:35:38 +01:00
Schuyler Cebulskie
25531170ec Fix catch in _sendMessageRequest 2016-09-13 21:29:45 -04:00
Schuyler Cebulskie
bb0ca11776 De-stupify RESTMethods.getExistingDM 2016-09-13 20:50:18 -04:00
Amish Shah
fbcea236c5 Fix avatars not being set on selfbots - fixes #697 2016-09-13 20:21:12 +01:00
Amish Shah
3dab19a3bc Add Client.fetchInvite 2016-09-11 18:19:55 +01:00
Schuyler Cebulskie
47d71d32f3 Make grammer gooder 2016-09-11 01:40:37 -04:00
Schuyler Cebulskie
7da00cf0fe Add long message splitting 2016-09-11 01:01:36 -04:00
Amish Shah
e75dd2638c Add Burst requests - addresses #656 2016-09-10 22:12:10 +01:00
Amish Shah
d7bf40cab0 Simplify APIRequest endpoint 2016-09-10 17:21:15 +01:00
Amish Shah
894115758c Stricter rate-limiting to avoid unlikely 429s 2016-09-10 17:21:04 +01:00
Amish Shah
4255dcd3ca Fix multipart for requests, fixes #675 2016-09-10 12:40:51 +01:00
Programmix
ab4707f9b4 Fix crash on role update (#648) 2016-09-07 00:26:34 -04:00
Schuyler Cebulskie
c7b4cf3d3f Add Guild.fetchMember 2016-09-06 20:36:58 -04:00
Kelvin Wu
f3286402fb Make Message.edit() accept arrays. (#630)
* Make Message.edit() accept arrays. Update corresponding parameters in docs (#624).

* Tweak parameter types in docs.

* Update docs.
2016-09-06 20:32:24 -04:00
Schuyler Cebulskie
9d694d2b67 Add ability to ban non-members from guilds (#638) 2016-09-06 16:55:42 -04:00
Schuyler Cebulskie
dc7b07022c Add GuildMember.addRole/addRoles (#615)
* Add GuildMember.addRole/addRoles

* Add GuildMember.removeRole/removeRoles
2016-09-05 07:18:51 +01:00
Schuyler Cebulskie
5bd258a557 Allow sendMessage disableEveryone to override client option (#605) 2016-09-04 21:05:38 +01:00