Commit Graph

209 Commits

Author SHA1 Message Date
SpaceEEC
ea76a56639 feat(Webhook): add type property and created* getters (#3585)
* feat(Webhook): add created* getters

* feat(Webhook): add type property

* typings(WebhookFields): use primitive string for url getter

Co-Authored-By: Gryffon Bellish <owenbellish@gmail.com>

* fix(Webhook): token can be null

Co-authored-by: Gryffon Bellish <owenbellish@gmail.com>
2019-12-27 19:27:34 +01:00
SpaceEEC
fc27ce1a15 typings(Bitfield): add hasParams to toArray, fix serialize's type (#3579)
* typings(Bitfield): add hasParams to toArray, fix serialize's type

* fix: apply suggested changes

* chore: remove incorrect whitespace

* fix: make params optional

* nit: pluralize bit in Permissions#missing

* nit: group non-static methods together
2019-12-27 19:26:41 +01:00
Antonio Román
b4f00bfb6b feat: widen GuildResolvable to include more structures (#3512)
* feat: Widen GuildResolvable to include GuildChannel and GuildMember

* docs: Documented the new overloads

Co-Authored-By: Gryffon Bellish <owenbellish@gmail.com>

Co-authored-by: Gryffon Bellish <owenbellish@gmail.com>
2019-12-21 21:28:09 +01:00
ottomated
f578cce9ac feat(Guild): add systemChannelFlags (#3559)
* Add systemChannelFlags bitfield to Guild

* Implement @vladfrangu's suggestions

* fix: apply suggestions, reverse order of flags, reword docs

* docs: add SystemCHannelFlagsResolvable typedef

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2019-12-21 21:27:14 +01:00
Charlie
e13b3f550d typings: TextChannel.topic & NewsChannel.topic should be nullable (#3628)
* Fix GuildChannel#topic to be optional

* Update typings/index.d.ts

Implement the suggested change from optional to null return

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

* Update typings/index.d.ts

Implement the suggested change from optional to null return

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

Co-authored-by: izexi <43889168+izexi@users.noreply.github.com>
2019-12-21 21:12:35 +01:00
SpaceEEC
7d74e7e419 typings(Extendable): add missing channels (#3581) 2019-12-20 11:58:46 +01:00
Vlad Frangu
5519d6fbaa src: sharding cleanup and checkReady rewrite (#3393)
* src: Step 1 of who knows how many

* src: Remove accidentally committed test file

* src: Remove useless added property in package.json

* docs: Trailing spaces, come back >.>

* src: Buhbye uws, we will miss you..not!

* src: Move 'auto' shard selection from totalShardCount to shards

* src: tweak

* src: Filter out floats from shard IDs
You want half of a shard or what?

* src: Misc cleanup and bugfix for GUILD_BAN_ADD

* src: Rewrite checkReady

* src: Misse this while merging master into my branch

* typings: Bring these up to date

* typings: Forgot allReady event

* src: Don't checkReady if the shard isn't waiting for guilds

* src: Fix a possible bug for when the ws dies and the session becomes -1

* src: Hopefully fix last edge case that could case a shard to infinitely boot loop

* src: Rename totalShardCount to shardCount

* src: Small bugfix

* src: Correct error message for shardCount being imvalid

Co-Authored-By: bdistin <bdistin@gmail.com>

* src: Small tweaks

* src: If this doesn't fix the issues I'm gonna throw a brick at my PC

* src: I swear, STOP BREAKING

* src: *groans at a certain snake*

* src: Use undefined instead of null on destroy in close event

Setting it to null sets the close code to null, which causes a WebSocket error to be thrown. The error is thrown from WebSocket, although there is no connection alive. Fun times!

* src: @SpaceEEC's requested changes

* src: Remove zucc from discord.js

Discord is removing support for it, sooo... Bye bye

* src: Missed this

* src: Apply @kyranet's suggestions

Co-Authored-By: Antonio Román <kyradiscord@gmail.com>

* src: @kyranet's suggestions

* src: Remove pako, update debug messages
- Pako is officially gone from both enviroments
  Install zlib-sync on node.js if you want it
- Improve a few debug messages some more
- Discover that internal sharding works in browsers but please don't do that
2019-12-15 20:45:27 +01:00
Gryffon Bellish
f56b442e83 typings(Bitfield): use IterableIterator instead of Iterator (#3599) 2019-12-15 20:26:09 +01:00
izexi
43782839ec feat: add new MessageFlags.FLAGS & User#system (#3603)
* feat: add new FLAGS

* feat: add system property

* typings: add User#system & new MessageFlagsStrings
2019-12-15 20:23:06 +01:00
Carter
330d5db586 feat(Webhook): addition of Webhook#avatarURL function (#3625)
* feat: addition of Webhook#avatarURL

* typings: added Webhook#avatarURL

* fix: trailing space

* docs: fixed jsdoc function description

* fix: typo
2019-12-15 20:20:15 +01:00
Jeroen Claassens
2ca74d6b63 feat(Activity): support for CUSTOM_STATUS activity type (#3353)
* feat: support for custom status in activity

* nit(typings): order properties
2019-12-05 13:13:42 +01:00
Jyguy
cbde819b6a typings(GuildAuditLogsFetchOptions): specify concrete type of 'type' property (#3586) 2019-11-20 00:21:47 +01:00
Gryffon Bellish
d39f17925d fix(Invite): fix valueOf returning undefined (#3582)
* Update Invite.js

* Fix typings

* Fix ESLint errors
2019-11-19 21:54:35 +01:00
Carter
1bcc0c2e1d feat(GuildAuditLogs): add new event types (#3584)
* adds more audit-log entries

this adds additional audit-log types from https://discordapp/discord-api-docs/pull/1191

* typings for new audit-log entries

* typings for new audit-log entries

* fix action numbers
2019-11-19 21:51:26 +01:00
matthewfripp
38d370fb18 feat(MessageAttachment): add spoiler property (#3561)
* feat(MessageAttachment): add spoiler property

* typings

* Implement suggestions

* Make readonly

Co-Authored-By: Antonio Román <kyradiscord@gmail.com>
2019-11-04 14:44:36 +01:00
Purpzie
99466a99ed typings(Util): use StringResolvable (fixes old pull) (#3556)
Fixes my extremely old pull #3212 that didn't actually update the typing (Didn't know at the time.)
2019-11-04 11:33:42 +01:00
Alexander Kashev
16db92ede8 typings(GuildEmoji): restore deletable, remove inherited property deleted (#3543)
* Typings: restore deletable on GuildEmoji

* Remove inherited property "deleted"
2019-10-18 13:06:34 +02:00
Antonio Román
a61cfc3004 docs: VoiceStateUpdate always sends an instance of VoiceState (#3537)
* docs: VoiceStateUpdate always sends the old

* typings: Update definition for voiceStateUpdate event
2019-10-18 11:32:19 +02:00
Alexander Kashev
ca1bd61f4f typings(Emoji): remove deletable, add deleted, mark nullable props (#3542) 2019-10-18 11:30:49 +02:00
Tenpi
79133b4d5e at(typings): partial Types (#3493)
* test

* test 2

* update

* update

* replaced double quotes

* Made message.guild and message.member nullable

* replaced double quotes again (oops)

* missing semicolons

* removed fetch from Omit

* Added Partialize generic type

* Created interfaces (prettier intellisense)

* joinedAt/joinedTimestamp are nullable and fixed conflict
2019-10-12 00:52:00 +02:00
Antonio Román
a60f8b3d49 src(constants): add missing APIErrors (#3531)
* src: Updated APIErrors

* typings: Updated constants
2019-10-11 11:01:16 +02:00
izexi
a8f06f251f feat(VoiceState): add VoiceState#streaming (#3521)
* feat: add VoiceState#streaming

* typings: add VoiceState#streaming
2019-10-04 16:44:35 +02:00
izexi
3458693748 typings: mark GuildMember#nickname as nullable (#3516) 2019-10-04 11:19:46 +02:00
Souji
e936f071c0 fix(typings): GuildChannel#parentID is nullable (#3508) 2019-10-02 14:26:42 +02:00
Vlad Frangu
a4f06bdffd src: support new message fields (#3388)
* src: Update channel pattern

* src: Remove useless non-capture group

* src: it's as though we're starting fresh

* src: Bring this up to date for reals now

* src: typings and a bug fix

* src: Add crossposted channels to message mentions

* src: Requested changes and add typings

* src: Move Object.keys outside loop

* typings: Fix enum being exported when it shouldn't

* src: Consistency with roles and users

* docs: Correct docstring for MessageFlags#flags

* docs: Correct docstring for MessageMentions#crosspostedChannels

* docs: Suggestions
Co-authored-by: SpaceEEC

* src: Reset flags to 0 if no flags are received on MESSAGE_UPDATE
2019-10-01 11:01:55 +02:00
Vlad Frangu
ea8b4e7355 docs/typings: Rename LURKABLE to PUBLIC and update GuildFeatures type (#3484)
* docs: Rename LURKABLE to PUBLIC

* typings: Update GuildFeatures type
2019-09-25 23:28:12 +02:00
BadCoder1337
d05334fd3c typings: make TypeScript interaction with channels better (#3469)
* make channel returning methods generic

* channel's type inference from kind of channel

* add extends

* rename generic due to name convention

* edit overload

* Update index.d.ts

* Update index.d.ts

* Update index.d.ts


Co-authored-by: Crawl <icrawltogo@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2019-09-19 23:01:08 +02:00
1Computer1
d5831df7b1 fix: typings for this-polymorphism of collections (#3472)
* Fix typings for this-polymorphism of collections

* Update index.d.ts


Co-authored-by: Crawl <icrawltogo@gmail.com>
2019-09-18 00:53:00 +02:00
iCrawl
ea9e144190 fix(typings): remove leftover typeof 2019-09-11 02:11:31 +02:00
iCrawl
33ecdd4c50 fix(typings): collection constructor 2019-09-11 01:58:12 +02:00
Crawl
ac44a7fc57 fix(typings): collections import 2019-09-10 20:34:47 +02:00
Crawl
321beb73bd revert: "feat(Partials): add DMChannel/MessageReaction#fetch()… (#3468)
This reverts commit b0047c424b.
2019-09-10 19:49:56 +02:00
1Computer1
dad0cd8e81 feat: external collection package (#2934)
* Use external collection package

* Complete typings

* Document properly base collection class

* Add clone since sort is now in-place

* Update for latest changes to package

* Fix whitespace

* Update docs link

* Oops

* Update Collection.js

* Update index.d.ts
2019-09-10 17:44:47 +02:00
izexi
b0047c424b feat(Partials): add DMChannel/MessageReaction#fetch() and Parti… (#3261)
* add DMChannel#fetch() & Action#getChannel({recipients})

* ref for MessageReaction partial

* typings

* add PartialTypes.REACTION

* accommodate for fully removed reactions

* fix incorrect wording and typo

* typings: MessageReaction#count is nullable

* typings: mark MessageReaction#partial as readonly

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

* fix(User): fetch dm channel if cached one is partial

* docs: add missing comma

Co-Authored-By: Antonio Román <kyradiscord@gmail.com>
2019-09-10 16:09:06 +02:00
Carter
6f83e71555 feat: Guild#partnered (#3444)
* feat: Guild#partnered

* typings: added Guild#features

* fix: removed trailing space

* typings: made Guild#partnered readonly
2019-09-10 15:47:13 +02:00
SpaceEEC
4072ffb50d typings(GuildChannel): add members getter (#3467) 2019-09-10 15:44:00 +02:00
Will Nelson
c86a6154aa feat(VoiceState): add kick method (#3462)
* feat(VoiceState): add kick method

* feat(typings): add types for VoiceState#kick method
2019-09-10 10:00:04 +01:00
Ryan Munro
a6810e2eaa feat(Permissions): add new method Permissions#any (#3450)
* Add new method Permissions#any

* Update src/util/BitField.js

This is much better

Co-Authored-By: bdistin <bdistin@gmail.com>

* Remove unreachable code

* Gotta keep the linter happy

* Apply bdistin suggested change to both methods
2019-09-10 10:55:42 +02:00
iCrawl
c5cbf8677e feat(typings): reply overloads for splitmessage 2019-09-06 12:03:21 +02:00
Schuyler Cebulskie
45af62a621 Update typings for renamed shard events 2019-08-31 17:18:18 -04:00
Yukine
9e6a73d1a0 typings(Client): remove 'resume', add 'replayed' parameter to 'shardResumed' (#3455)
corrected shardResumed & removed old resumed event
2019-08-31 22:17:46 +02:00
Crawl
89d9b0f498 fix(typings): partially revert #3448 2019-08-29 20:16:38 +02:00
didinele
745a0ea942 typings(DataStore): correct return types for resolve, resolveID and remove (#3448)
* fix(typings): DataStore#resolve & DataStore#resolveID can also return null.

* fix(typings): DataStore#remove returns a boolean, not void.

Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com>
2019-08-28 11:11:15 +02:00
Amish Shah
c715ed9f8b voice: remove passes
(discord will begin dropping duplicated audio packets from tomorrow, you should not set passes > 1)
2019-08-22 12:15:20 +01:00
Vlad Frangu
fbd811517a src: Update Webhook#sendSlackMessage to be accurate with what the API returns (#3429)
* src: Update sendSlackMessage

* typings
2019-08-19 21:02:33 +01:00
Saya
e4309b23d5 feat: abort Requests that takes a lot of time to resolve (#3327)
* Add Request Timeout

* Add abort controller in packages

* Fix Lint Error.

* Fix Lint Errors

* Make Timeout Customizable & use finally

* Fixed a minor issue

* Fix eslint

* Update request timeout to use d.js client timeout methods.
2019-08-19 18:55:07 +02:00
izexi
d62db232e7 feat(Invite): add targetUser(Type) (#3262)
* add Invite#targetUser(Type)

* incase discord decides to add 0
2019-08-17 20:31:04 +02:00
Gryffon Bellish
ab27dd0218 refactor(TeamMember): remove client from constructor (#3409)
* Remove client from TeamMember constructor part 1

* Remove client from TeamMember constructor part 2

* update typings
2019-08-17 18:24:16 +02:00
didinele
2df4f227a4 refactor: move Guild#defaultRole to RoleStore#everyone (#3347)
* remove guild#defaultRole

* add RoleStore#defaultRole

* typings

* fix trailing space

* another one

* Rename it to everyone
2019-08-17 18:02:17 +02:00
bdistin
6d3c55b68c feat(Collector): allow collectors to be consumed by for-await-of loops (#3269) 2019-08-17 17:57:45 +02:00