Commit Graph

185 Commits

Author SHA1 Message Date
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
Carter
7fae6e5bca typings: switch overloads of RoleStore#fetch (#3397)
because compu told me to
2019-08-17 17:51:52 +02:00
iCrawl
d14db52158 fix(typings): send overloads 2019-08-04 15:57:39 +02:00
Crawl
5af8cb8e6e feat: overload for split always returning an array (#3411)
* feat: overload for split always returning an array

* feat: update Util.splitMessage
2019-07-30 00:25:45 +02:00
Alex
e562564123 docs(Guild): add missing features (#3406)
* Update Guild.js

* Update Guild.js

* style(Guild): remove trailing space

* typings(Guild): add new features
2019-07-28 15:24:27 +02:00
Kitten King
d8516efa36 docs: fix typos (#3404) 2019-07-25 17:18:23 +02:00
MoreThanTom
547bf83100 feat(typings): constants export (#2915)
* Added typings for Constants export

* Full typing of list Constants

* Fix mistake in Package typing

* Cleanup for requested changes

moved fs import to import cluster
WSEvents using WSEventType to build type

* Satisfy tslint rules

* Update Constants.js

* Update index.d.ts

* Update index.d.ts

* Update index.d.ts

* Update index.d.ts

* Update index.d.ts

* Update index.d.ts

* Update index.d.ts

* Update index.d.ts
2019-07-12 17:02:45 +02:00
bdistin
00c4098bb3 refactor(Util.escapeMarkdown): allow separate escaping and add tests (#3241)
* wip refactor

* add escapeMarkdown tests

* italics can be done with a single underscore too

* more refined

* fix test name

* unnecessary eslint ignores

* use jest

* make eslint less annoying in this test file

* more testing

* fix lib usage

* more tests and a small fix
2019-07-11 22:08:40 +02:00
Eduardo Londero
f1433a2d97 feat(Collector): add idle time for a Collector to stop itself (#2942)
* Implement idle feature

* Add typings

* Minimal fixes

* Make everything in Collector and not attached to ReactionCollector

* set this._idletimeout to null when collector ends

* also set this._timeout to null when collector ends
2019-07-11 21:40:12 +02:00
Jisagi
adb082305d feat(Guild): add banner to edit method and add setBanner method (#3364)
* add setBanner method to Guild

* typos fixed & typings added

* more typings

* docs(Guild): add banner to GuildEditData
2019-07-11 13:09:43 +02:00
Skillz4Killz
20d7b3de59 docs/typings(VoiceStateStore): document and type the class (#3294)
* Update index.d.ts

* Update Guild.js

* Update Guild.js

* docs/typings(VoiceStateStore): document and add typings
2019-07-04 16:20:28 +02:00
SpaceEEC
1dd4c041e0 fix(ClientApplication): owner is still nullable
Fixes #3358
2019-06-26 20:12:05 +02:00
SpaceEEC
d7b2146c81 refactor(TeamMember): make id a getter 2019-06-25 20:40:15 +02:00
bdistin
a22aabf6a8 feature: teams support (#3350)
* basic teams support

* export Team & TeamMember

* use typedef

* typings and some fixes

* Update src/structures/TeamMember.js

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

* fix Team#iconURL()

* fix typings and a bug

* fix states start at 1

* team icon hash can be null

* fix owner typings
2019-06-25 20:31:48 +02:00
SpaceEEC
8e1857286d typings(Guild): add typings for setRolePositions
See:
PR: #3317
Commit: 8bc8ffe168
2019-06-05 22:18:01 +02:00
Skillz4Killz
e87e4a6f0e typings(GuildChannelStore): add CategoryChannel as possible return value (#3326) 2019-06-05 21:46:11 +02:00
izexi
c87758086b feat: add support for premium guilds (#3316)
* add premiumTier and premiumSubscriptionCount

* add premiumSinceTimestamp and premiumSince

* add premium message types

* typings

* add GuildEmoji#available

* fix doc description
2019-06-05 21:34:33 +02:00
DeJay
5aa9425040 Removes the trace packet (#3312)
* Removes the trace packet

* Update src/client/websocket/WebSocketShard.js

Co-Authored-By: Amish Shah <amishshah.2k@gmail.com>

* Update src/client/websocket/WebSocketShard.js

Co-Authored-By: Amish Shah <amishshah.2k@gmail.com>
2019-05-30 19:57:34 +01:00
bdistin
5154850a54 Add Stream permission (#3309)
* Add Stream permission

* update docs, and DEFAULT

Created a new guild to test DEFAULT

* update typings
2019-05-30 08:26:49 +01:00
Will Nelson
d34b62414b fix: StreamOptions#volume typings (#3303) 2019-05-27 20:56:40 +01:00
Will Nelson
9ca36b8eea typings(VoiceState): add connection getter (#3292)
* fix: add connection to voice state typings

* Update typings/index.d.ts

Co-Authored-By: SpaceEEC <spaceeec@yahoo.com>
2019-05-25 16:18:44 +02:00
SpaceEEC
97f3b6c5eb typings(Guild): remove voiceConnection, add voice, cleanup rest
Fixes #3293
2019-05-24 15:42:09 +02:00
Antonio Román
b3060ea229 typings(Collection): use T in accumulator and initialValue when reducing (#3284)
This brings some consistency with Array#reduce's typings and to reality.
2019-05-20 20:49:28 +02:00
didinele
97de79bd5e fix(typings): Guild#member can return null (#3274)
* fix(typings): Guild#member did not have undefined as a return type

* oops, it can apparently return null
2019-05-16 21:14:45 +02:00
SpaceEEC
8b83e2fdcb typings(Presence): add missing guild property 2019-05-04 19:05:04 +02:00