Commit Graph

3855 Commits

Author SHA1 Message Date
izexi
23191da13d feat(Partials.GuildMember): GuildMemberRemove & Guild#me (#3229)
* use partials for GuildMemberRemove & Guild#me

* oops

* guild.members instead of Action.members

Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com>
2019-04-29 17:05:52 +01:00
Vlad Frangu
bc31746621 src: Client#readyAt should be updated when triggerReady is called (#3234) 2019-04-29 17:03:29 +01:00
Crawl
aa253d9551 fix(ClientUser): lint 2019-04-28 13:14:26 +02:00
Amish Shah
4e0cf87d0f fix: typing map being reset for ClientUser (#3216) 2019-04-27 18:52:26 +01:00
Amish Shah
e0cfb7fb36 fix: not checking for guild when creating a channel 2019-04-27 13:39:23 +01:00
Amish Shah
4d7fc036a1 fix: channels being removed from guild.channels 2019-04-27 11:46:48 +01:00
Vlad Frangu
577636a46d src: fix random broken reconnects (#3233) 2019-04-27 08:25:24 +01:00
Vlad Frangu
de79bba965 src: Fix type error in WebSocketShard#onError (#3231) 2019-04-24 16:53:41 +02:00
izexi
7b531648e0 feat(GuildMemberStore) add options.count to prune (#3189)
* add GuildMemberStore#prune(options.count)

* typings: proper typings for null return value
2019-04-23 21:59:52 +02:00
SpaceEEC
39115c8acc fix(MessageCreateAction): remove redundant GuildMemberStore#add call
This was also causing a bug where GuildMember#_roles was patched with a GuildMemberRoleStore
2019-04-23 21:21:41 +02:00
SpaceEEC
6a07715c1d fix(Guild): only update emojis when they are present in the payload 2019-04-23 21:02:16 +02:00
Vlad Frangu
75cd260808 src: Don't use the GuildMemberRoleStore to patch the GuildMember _roles (#3226)
* src: Don't use the GuildMemberRoleStore for patching GuildMember#_roles

* src: Remove usage of _patch from the store

* src: Finish up clone changes
2019-04-23 19:44:02 +01:00
didinele
3f6d08a499 fix(typings): Collection#find & findKey can return undefined (#3228)
* fix(typings): [Collection#find](https://github.com/didinele/discord.js/blob/master/src/util/Collection.js#L172) can also return undefined

* same thing for findKey
2019-04-23 18:47:42 +02:00
Amish Shah
23e6414420 fix: old objects not being cached (#3225)
please post issues if you find any, will probably cause some
2019-04-23 11:32:03 +01:00
izexi
c4b79571ba feat(Invite): add deletable getter (#3203)
* add Invite#deletable

* fix ci

* reee

* since guild is nullable

* accommodate for external invites

* nit(Invite): use guild instead of channel.guild
2019-04-22 09:24:32 +02:00
izexi
f7f4607b5f docs(faq): bump to node 10.0.0 (#3224) 2019-04-22 09:09:06 +02:00
anandre
d1778772cd docs: update node version requirement, npm install links, add update guide (#3220)
* Update welcome.md

Update node version requirement, npm install links, docs links, made a note that the guide is for stable and added a new link to the WIP update guide.

* docs(welcome.md): put notice for wip update guild on its own line

* docs(welcome.md): indent own line

* docs(README.md): apply the same changes here
2019-04-21 13:47:09 +02:00
Antonio Román
01c708bc75 feat(Sharding): change waitForReady to spawnTimeout (#3080)
This means that you'll not only be able to choose between having a timeout or not, but also to set the amount of milliseconds as you wish.
2019-04-21 13:34:09 +02:00
Purpzie
abd9d36816 feat(Util): resolve text parameter of splitMessage to a string (#3212) 2019-04-21 09:38:09 +02:00
Dragoteryx
52b4f09e58 fix(Structures): allow multiple extensions by checking prototype chain (#3217) 2019-04-21 09:34:12 +02:00
Vlad Frangu
1514df0f87 fix: emit resume event, silent disconnects, error event param (#3192)
* src: Fix shardResumed event not being emitted

* docs: Document Client#error again

* src: Fix onError due to incorrect typings

* src: handle onError properly for both uws and ws

* src: Try to fix silent disconnects when using uWs

* fix(WebSocketShard): uws emits plain objects, not errors

Emitting line of code: 39aa429f94/src/uws.js (L80-L83)
Listener attaching is here: https://github.com/discordjs/uws/blob/master/src/uws.js#L128
For reference, found a clue here: https://github.com/discordjs/discord.js/issues/1528
2019-04-21 09:32:16 +02:00
SpaceEEC
cde955c766 fix(PresenceUpdateAction): emit presences again (#3214)
* fix(PresenceUpdateAction): emit presences again

* update typings
2019-04-19 08:49:17 +02:00
Gryffon Bellish
bccbb550b0 docs(Collector): specify the unit for CollectionOptions#time (#3219) 2019-04-19 08:47:39 +02:00
Deivu (Saya)
b5320299f7 Only reset sessionID when close code is 1000 or 4006 (#3213)
* Event code 1001 should not get its sessionID reset

* Reset sessionID when close code is 1000 or 4006
2019-04-17 14:32:57 +01:00
izexi
39fd8fd645 fix(typings): remove duplicated Guild#defaultRole (#3211) 2019-04-16 22:14:01 +02:00
izexi
0b1176d9a1 chore(typings): declaring explicit nullable returns (#3134)
* strict nullable & WebSocketManager private typings

* missing semicolon

* kyra suggestion #1

Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com>

* kyra suggestion #2&3

* space's requested changes

* space's requested change

* strict nullable & WebSocketManager private typings

missing semicolon

kyra suggestion #1

Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com>

kyra suggestion #2&3

space's requested changes

space's requested change

* resolve conflicts

* deflate
2019-04-15 21:01:39 +02:00
MoreThanTom
52bc5b0170 feat(MessageEmbed): resolve color in embed constructor (#2912)
* Resolve color in embed constructor

* Use ColorResolvable type for color parameter

* docs(MessageEmbed): color property is still a number
2019-04-15 20:46:59 +02:00
Vlad Frangu
eb537b6f48 docs(WebSocketShard): mark non-nullable parameters as non-nullable (#3209)
* docs: Imagine having an optional nullable param

* docs: Another one
2019-04-15 20:17:27 +02:00
izexi
d9a053df67 docs(Presence): add ClientPresenceStatus typedef (#3208) 2019-04-15 14:41:37 +02:00
danielnewell
2af101efbb docs(faq): add a link to the guide, restructure a bit (#3082)
* Update faq.md

added link to guide

* docs(faq): link documentation as per suggestion
2019-04-14 15:47:52 +02:00
Isabella
cbb9b14950 test: add Webhook(Client) testing file (#2855)
* test: add WebhookClient testing file

* webhooks cant edit messages, silly

* add more webhook types as requested

* fix typo

* eslint matters

* fix(webhooktests): add 'use strict', remove embed: tests
2019-04-14 15:27:59 +02:00
izexi
520810d484 feat(Util): add YELLOW to ColorResolvable (#3182) 2019-04-14 14:58:33 +02:00
SpaceEEC
ca43919642 docs: document constructors of extendible structures (#3160)
* docs: document constructors of extendible structures

* docs(ClientPresence): document default value for data parameter

Co-Authored-By: SpaceEEC <spaceeec@yahoo.com>

* docs(Presence): document default value for data parameter

Co-Authored-By: SpaceEEC <spaceeec@yahoo.com>

* docs(DMChannel): capitalize DM in the constructor doc
2019-04-14 14:50:55 +02:00
izexi
5d10585af8 docs(Presence): add missing descriptions to clientStatus (#3127)
* add description on jsdocs for User.clientStatus

* Update src/structures/Presence.js

Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com>

* Update src/structures/Presence.js

Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com>

* Update src/structures/Presence.js

Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com>

* update typings
2019-04-14 14:43:01 +02:00
SpaceEEC
97c196ca6a docs(GuildEmoji): add @ name to requiresColons and managed properties 2019-04-13 19:32:43 +02:00
thomasxd24
8da141637c fix end method in VoiceBroadcast (#3194)
* fix end method in VoiceBroadcast

this.client is a ClientVoiceManager and thus its this.client.broadcasts  instead of this.client.voice.broascasts

* revert the voicebroadcast and pass this.client at clientvoice

* passed this.client
2019-04-11 21:34:12 +01:00
izexi
62cba2e148 docs(GuildChannel): fix setPosition's reason type (#3199) 2019-04-11 10:10:31 +02:00
anandre
266ac1c659 docs(Role): fix setPosition's reason type (#3198) 2019-04-10 21:40:22 +02:00
Reseq64
6be5051f92 typo(RequestHandler): fix spelling of 'requests' (#3196)
Removed the additional "s" to "requessts"
2019-04-10 17:07:50 +02:00
Vlad Frangu
89e27e5071 src: Make broadcasts work again (#3190) 2019-04-08 17:29:19 +01:00
SpaceEEC
f479afca82 src: Fix TypeError (#3187) 2019-04-08 14:21:48 +02:00
Vlad Frangu
70d4b4455b refactor(ClientVoiceManager): make public, remove Client#voiceConnections (#3186)
* docs: make voice public

* typings: Update typings to match the docs

* typings: ClientVoiceManager is nullable in Client

Co-Authored-By: vladfrangu <kingdgrizzle@gmail.com>

* typings: Mark client as readonly

Co-Authored-By: vladfrangu <kingdgrizzle@gmail.com>

* src: Make the client readonly

* src: Remove Client#voiceConnections getter in favor of ClientVoiceManager#connections
2019-04-08 14:20:53 +02:00
izexi
152d2e88bd refactor(WebSocket): utilize URLSearchParams (#3185)
* replace querystring with URLSearchParams

* looks a bit nicer using urlSearchParams.set(...)
2019-04-08 14:06:23 +02:00
Vlad Frangu
982f48ce6a src: Fix TypeError 2019-04-07 10:57:11 +03:00
SpaceEEC
00eb7e325a fix(ApiRequest): filter out null query values
Fixes #3183
2019-04-05 16:32:50 +02:00
SpaceEEC
bfab203934 fix(ShardingManager): do not spawn the last shard early
An off-by-one error resulted in the last shard getting the delay of the second last one.
Closes #3181
2019-04-05 14:46:25 +02:00
bdistin
5e9bd786d1 refactor(APIRequest): utilize URLSearchParams (#3180)
* utilize URLSearchParams

* options.query can be undefined/null

* oops

* remembered what I intended
2019-04-05 11:32:19 +02:00
izexi
c078682722 feat(Webhook): add url getter (#3178)
* add Webhook#url

* set typing as readonly

* suggested change

* another one
2019-04-05 11:09:58 +02:00
bdistin
bb92289e45 fix: remove GuildChannel fallback, and remove GuildChannel as extendable (#3165)
* remake pr

* typings
2019-04-03 23:02:19 +02:00
SpaceEEC
089f65fd2a fix(RequestHandler): pass HTTPError pass path instead of route as path 2019-04-03 22:45:51 +02:00