Commit Graph

3826 Commits

Author SHA1 Message Date
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
SpaceEEC
32a432f4a5 cleanup(ShardClientUtil): rename id to ids 2019-04-01 13:46:27 +02:00
Vlad Frangu
3f5161eb76 fix: Internal Sharding, this time fixed™ (#3140)
* src: WIP Internal Sharding refactor

* src: Refactor unavailable guild check
Co-Authored-By: kyranet <kyradiscord@gmail.com>

* src: More WIP Code
F in the chat to the old manager

* src: It should work but Discord says no.
Seriously why is this not working!

* fix: Inflator causing issues

* src: Finishing touches and typings

* misc: Proper debug message

* fix: Making things hidden needs writable: true as well

* fix: Sharding allowing multiple of the same shard, negative shards or strings

* fix: Again... edge cases
I love you guys .w.

* misc: Touchups

* misc: Better error?

* docs: Typo

* typings: Requested changes

* src: Requested changes

* src: Fix issues, validate provided shard options and more

* src: Forgot to remove the listener

* lint: eslint complaining

* fix: Setting shardCount to auto crashing the process

* misc: Requested changes

* typings: Correct typings for shardCount client option

* typings: Add invalidSession event to the shard and correct typings

* src: Minor docs adjustements, and code consistency between setHelloTimeout and setHeartbeatTimeout

* src: Don't block reconnect while creating shards
Might fix silent disconnects *again*

* src: Prevent reconnect from running if the Manager isn't READY
That way, if a shard dies while we're still spawning, it won't cause issues

* fix: Retry to reconnect if there's a network error going on.
The manager *should* keep reconnecting unless the token is invalid

* src: Enhance onClose handler for shards in the manager
- If the close code is between 1000 and 2000 (inclusive), you cannot resume
I tested this locally
- If there's a session ID still present, immediately try to resume
Faster resumes :papaBless:
Otherwise, the invalid session event will trigger and it'll handle accordingly

I swear if I see a SINGULAR Silent DC I'm yeeting

* src: Fix error check

* src: Make sure message exists on the error

* src: Used the wrong property for the shardQueue

* src: Make the hello timeout be made by the client
god help

* docs: Correct docs for WSEvents

* misc: Remove old events from the Events constant

* src: Throw the HTTP error if we don't get a 401

* typings: Can't forget about them

* src: Implement some more fail safes just in case
Seriously, better safe than sorry! Gotta failproof it completely
2019-04-01 09:43:45 +02:00
Ryan Munro
4b6e8fcab5 typings(Collection): add missing thisArg to partition (#3167) 2019-04-01 09:36:03 +02:00
Schuyler Cebulskie
04fa56d0c0 Improve structure extension errors 2019-03-24 16:45:34 -04:00
Amish Shah
b74a4356dd fix lint errors 2019-03-23 12:54:22 +00:00
Amish Shah
6adb0a6609 voice: add ability to delete broadcasts 2019-03-23 12:52:18 +00:00
Amish Shah
9a092b6e57 voice: rename createVoiceBroadcast to createBroadcast 2019-03-23 12:37:55 +00:00
Amish Shah
c8225631c9 voice: move broadcasts to client.voice 2019-03-23 12:36:53 +00:00
Amish Shah
3df56540e2 voice: add documentation to VoiceBroadcast 2019-03-23 12:22:55 +00:00
izexi
9b2bf03ff6 feat(MessageStore): add cache parameter to fetchPinned() (#3154)
* add cache param to MessageStore#fetchPinned()

* typings for cache param

* set cache to true by default
2019-03-19 20:35:58 +01:00
izexi
2341d13615 fix: messageReactionRemove not emitting for partial messages (#3125) 2019-03-19 20:32:11 +01:00
SpaceEEC
e62833b5e1 docs: mark getters as @ readonly 2019-03-19 19:59:45 +01:00
Ryan Munro
df1889ab49 cleanup(Guild): removed fetchAuditLogs' "after" option (#3142)
* Removed code and documentation for Guild.fetchAuditLogs "after" option

* Also removed the option from typings
2019-03-12 19:14:32 +01:00
bdistin
1673b6f8f5 fix(APIMessage): edit shouldn't remove content (#3129)
* edit shouldn't remove content

If undefined is passed to the api, content isn't removed in such a case where you are only editing the embed.

* fix a related doc string

* update typings

* requested changes
2019-03-08 17:57:59 +01:00
Antonio Román
132788937a src: add missing events in constants (#3124)
* src: Add missing events in constants

* fix: Restore 'use strict';
2019-03-05 17:18:11 +01:00
Kamran Mackey
1207c243d1 typings(Guild): add missing defaultRole property (#3126)
* [typings] Fix missing defaultRole property under Guild.

Signed-off-by: Kamran Mackey <kamranm1200@gmail.com>

* [typings] Added missing readonly identifier.

Signed-off-by: Kamran Mackey <kamranm1200@gmail.com>
2019-03-04 20:32:15 +01:00
SpaceEEC
579283dfe9 fix(Role): proper undefined check for data.permission when editing 2019-03-02 21:58:40 +01:00
bdistin
fe5563e158 refactor(User): avoid invoking dmChannel getter more than once per method (#3108)
also refactors to async methods
2019-02-24 09:37:10 +01:00
Linn Dahlgren
7006f00ae4 feat(MessageEmbed): add missing proxyURL property to video (#3109)
* Added missing property to MessageEmbed.video

* Updated typings for MessageEmbed.video
2019-02-24 09:27:57 +01:00
Kyra
bc0a761e22 typings: Convert types to interfaces where applicable (#3068) 2019-02-23 22:14:09 -06:00
Linn Dahlgren
4d3f76656a docs(MessageEmbed): add missing type value (#3106) 2019-02-23 10:05:04 +01:00
Amish Shah
73be952406 use official release of prism 2019-02-21 11:56:46 +00:00
Amish Shah
efbbfbcec6 fix #3102 2019-02-20 19:15:33 +00:00
Amish Shah
6aa792f9ab voice: cleanup internals whether end() or destroy() is called 2019-02-19 13:16:48 +00:00
Amish Shah
4009986bc8 voice: destroy opus 2019-02-17 21:48:47 +00:00
Amish Shah
0564c5c777 voice: update prism 2019-02-14 16:57:26 +00:00
SpaceEEC
4289b18ab2 docs(GuildMember): add missing @name to document user property
Fixes #3090
2019-02-14 11:19:05 +01:00
Amish Shah
5c3f5d7048 Partials (#3070)
* Remove GroupDMChannels

they sparked no joy

* Start partials for message deletion

* MessageUpdate partials

* Add partials as an opt-in client option

* Add fetch() to Message

* Message.author should never be undefined

* Fix channels being the wrong type

* Allow fetching channels

* Refactor and add reaction add partials

* Reaction remove partials

* Check for emoji first

* fix message fetching

janky

* User partials in audit logs

* refactor overwrite code

* guild member partials

* partials as a whitelist

* document GuildMember#fetch

* fix: check whether a structure is a partial, not whether cache is true

* typings: Updated for latest commit (#3075)

* partials: fix messageUpdate behaviour (now "old" message can be partial)

* partials: add warnings and docs

* partials: add partials to index.yml

* partials: tighten "partial" definitions

* partials: fix embed-only messages counting as partials
2019-02-13 17:39:39 +00:00
Amish Shah
8910fed729 voice: debug UDP (#3044) 2019-02-12 16:29:11 +00:00