Commit Graph

438 Commits

Author SHA1 Message Date
Souji
8a059cccb8 feat(Guild): allow description and features in edit (#5505) 2021-04-27 09:36:48 +02:00
Souji
2c54f72670 chore(UserFlags): remove system flag (#5517) 2021-04-25 18:59:13 +02:00
Jan
1b827fe136 refactor: add discord-api-types as a dependency (#5539) 2021-04-23 02:18:07 +02:00
GoldElysium
0d68ca8eb9 fix: typings for 'Message' (#5518) 2021-04-21 02:44:19 +02:00
Advaith
f1c0c043b5 feat(Util): make cleanContent take a channel instead of a message (#5535) 2021-04-18 18:53:09 +02:00
Souji
596832371c feat(Guild): nsfw guilds (#5525)
Co-authored-by: Advaith <advaithj1@gmail.com>
2021-04-18 18:52:53 +02:00
Advaith
1be67b8851 feat(Guild): replace owner with fetchOwner (#5480) 2021-04-16 06:39:12 +02:00
PhaxeNor
3c175cb511 feat(GuildFeatures): added the new screening features (#5328)
Co-authored-by: Noel <icrawltogo@gmail.com>
2021-04-15 02:07:15 +02:00
anandre
936516cb9c docs(GuildChannelManager): fix type options in description (#5440) 2021-04-15 00:39:12 +02:00
monbrey
7b161f93a0 feat(MessageAttachment): support for #contentType (#5481)
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
2021-04-15 00:38:45 +02:00
Souji
e9bf206d88 fix(GuildAuditLogsEntry): executor can be missing (#5500) 2021-04-15 00:37:45 +02:00
Souji
fe93a7e084 feat(SysChanFlags): new flag and rename in sync with client (#5506) 2021-04-15 00:37:32 +02:00
Jan
207735cedc feat: move internal regular expressions to static properties (#5384) 2021-04-15 00:36:35 +02:00
Bryan Chen
900e57657e fix(typings): update GuildMemberRoleManager typings to match implementation (#5497) 2021-04-15 00:35:04 +02:00
GrapeColor
565d7b3747 fix(MessageMentions#channels): Fix type of channels of mentions (#5370) 2021-04-15 00:34:13 +02:00
Kevin Novak
32b0d71af7 feat(typings): add ShardingManager.shardList to type definitions (#5446) 2021-04-15 00:33:59 +02:00
Ven
7c49612d4b feat(typings): explicitly type PremiumTier and Collectors (#5458) 2021-04-15 00:33:35 +02:00
Shubham Parihar
eb43ce4d4f feat: make changes to PresenceData typings and docs (#5317)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2021-04-14 14:53:54 +02:00
Advaith
c9107e35fa feat(MessageTypes): add 16 and 17 (#4685) 2021-04-14 14:53:30 +02:00
izexi
0ba2bcb545 feat(GuildMemberManager): add 'search' method (#4154)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2021-04-14 14:53:01 +02:00
Amish Shah
eec7cf7634 feat: stage channels (#5456)
* feat: add stage channel type

* feat: initialise stage channel structure

* feat: add STAGE_MODERATOR permissions bitfield

* fix: typo in permissions

* fix(Channel): type selection logic

* feat: add rtcRegion to StageChannel and VoiceChannel

* feat: rtc region editing for stage and voice channels

* feat: stage channel userLimit

* feat: add stage channels to exports

* feat: add computed properties to stage channel

* feat(VoiceState): include stage channel in docs

* feat: allow ability to join stage channels

* feat(StageChannel): join and leave methods

* docs: add StageChannel link in GuildChannel docs

* feat(VoiceState): suppress and requestToSpeakTimestamp

* feat(StageChannel): setRequestToSpeak

* refactor(StageChannel): update setRequestToSpeak

* feat(VoiceState): add moveToSpeakers and moveToAudience

* feat(VoiceState): add methods to move in/out of speakers

* feat(VoiceState): add stage channel sanity checks

* feat(Permissions): add REQUEST_TO_SPEAK

* feat(VoiceState): simpler methods

* docs(VoiceState): add documentation for new methods

* refactor: remove unused error message

* chore: remove debug statements

* chore: revert changes to package-lock.json

* docs(VoiceState): clarify suppress

* docs(VoiceState): add missing @type param

* feat(StageChannel): remove nsfw property

* fix(VoiceState): check permissions in channel

Co-authored-by: Advaith <advaithj1@gmail.com>

* fix(VoiceState): instantiate error with new

Co-authored-by: BannerBomb <BannerBomb55@gmail.com>

* refactor(VoiceState): more readable API route builder

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>

* style(VoiceState): fix lint errors

* docs(VoiceState): add example usage for new methods

* docs: setRTCRegion examples

* chore: update typings

* fix(VoiceState): calculate permissions for self

* refactor(VoiceState): tidy up implementation

* Update src/structures/VoiceState.js

Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>

* refactor: vaporox's suggestions

* style(VoiceState): fix linter errors

* chore: update typings

* chore: remove unused error message

* refactor(VoiceState): use optional chaining

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>

* chore: move getters below constructor in typings

* refactor(StageChannel): optional chaining

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>

* style(VoiceState): fix lint errors

* docs: fix incorrect types

Co-authored-by: izexi <43889168+izexi@users.noreply.github.com>

* Update src/structures/VoiceChannel.js

Co-authored-by: izexi <43889168+izexi@users.noreply.github.com>

* Update src/structures/VoiceChannel.js

Co-authored-by: izexi <43889168+izexi@users.noreply.github.com>

* refactor(VoiceState): use optional chaining

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>

* refactor(StageChannel): remove permission override check in joinable

* refactor: make ChannelTypes a proper enum

* Use createEnum

Co-authored-by: izexi <43889168+izexi@users.noreply.github.com>

* chore: remove unused code from Constants

* refactor(StageChannel): remove unnecessary getters

* chore: update typings

* refactor: introduce BaseGuildVoiceChannel class

* refactor(VoiceChannel): reduce code duplication

* feat: export BaseGuildVoiceChannel

* chore: update typings

* docs: fix typos

* refactor: move setRTCRegion to BaseGuildVoiceChannel

* feat(VoiceState): remove permission checks

* chore: update typings

* Apply suggestions from code review

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>

* chore: update esm exports and typings

* Update src/structures/VoiceState.js

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>

Co-authored-by: Advaith <advaithj1@gmail.com>
Co-authored-by: BannerBomb <BannerBomb55@gmail.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
Co-authored-by: izexi <43889168+izexi@users.noreply.github.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-04-14 13:35:55 +01:00
Advaith
63ff6a07eb feat(Activity): add missing fields (#4984)
Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>
2021-04-06 23:03:45 +02:00
izexi
67025e63e4 fix: typings for 'WebhookMessageOptions' (#5476) 2021-04-04 23:17:19 +02:00
Jan
0a2e0c0e3e refactor(Guild): remove fetchVanityCode() (#5471) 2021-04-03 20:01:14 +02:00
izexi
7cabc1c490 feat(Webhook): add '(edit|delete)Message' methods (#5223) 2021-04-03 15:06:18 +02:00
Shubham Parihar
a4d09ab0a8 types: remove typings for Client#disconnect event (#5469) 2021-04-03 15:01:20 +02:00
Alec Woods
9d2d60691e feat(Rest): better handling of global rate limit and invalid request tracking (#4711)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Tristan Guichaoua <33934311+tguichaoua@users.noreply.github.com>
Co-authored-by: Papaia <43409674+Papaia@users.noreply.github.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-03-31 21:56:58 +02:00
Jan
06e9d86cb3 feat(Application): application flags (#5147)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-03-31 21:55:12 +02:00
Souji
624a4464ca feat(WebSocketManager): let identify throw on depleted limits (#5283)
* feat(WebSocketManager): let identify throw on depleted limits

* chore: remove WSM#sessionStartLimit
2021-03-28 15:33:31 +02:00
Jan
8d14ee3540 refactor(Collector): make endReason a getter (#5271) 2021-03-28 15:29:39 +02:00
Souji
43bd568f1c fix(ReactionUserManager): remove before query option (#5281) 2021-03-28 15:28:33 +02:00
Sugden
ca5f371f1a typings(PermissionOverwrites): use correct parameter type for resolveOverwriteOptions (#5302) 2021-03-28 15:28:08 +02:00
Carter
aac6275300 typings(MessageReaction): allow message to be partial (#5303) 2021-03-28 15:26:44 +02:00
Advaith
1c8b1096c6 docs(ChannelManager): fetch can return Promise<null> (#5422) 2021-03-28 15:24:19 +02:00
Sugden
ee5bc1a5c4 refactor: switch api and gateway to V8 (#4879)
Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>
2021-02-11 18:10:35 +01:00
ckohen
ae3c3d80ee feat(Client): add InviteGenerationOptions#additionalScopes (#5215)
Co-authored-by: izexi <43889168+izexi@users.noreply.github.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-02-10 15:52:44 +01:00
Antonio Román
a6bc39d3c6 fix(ApiMessage): remove resolve() from typings (#5241) 2021-01-27 11:28:26 +01:00
Matt (IPv4) Cowley
aaed72b723 refactor(Client): remove fetchAllMembers option (#5257)
* feat(Client): remove fetchAllMembers option & logic

* Cleanup

* Missed type change
2021-01-27 11:27:50 +01:00
Antonio Román
41bd6c2717 fix(GuildChannel): overload permissionsFor and BaseManager#resolve[id] (#5260)
* fix(GuildChannel): overload permissionsFor and BaseManager#resolve[id]

* fix(GuildChannel): GuildMessage and Role trigger non-null return
2021-01-27 11:27:01 +01:00
Ishmaam Khan
5401b92aac refactor(GuildMember): remove GuildMember#hasPermission (#5152)
* refactor(GuildMember): remove GuildMember#hasPermission

* refactor(GuildEmoji): remove use for `GuildMember#hasPermission`

* typings: remove `GuildMember#hasPermission`
2021-01-24 11:50:58 +01:00
Kevin Novak
80e1afb654 types(RateLimitData): remove timeDifference property (#5208) 2021-01-24 11:49:26 +01:00
Jan
a33eed71af refactor(Util): remove convertToBuffer (#5237) 2021-01-24 11:48:03 +01:00
Shubham Parihar
0d5de4333d fix(VoiceConnection): make #dispatcher nullable (#5217) 2021-01-22 19:17:32 +01:00
monbrey
5ac3b57f9b feat(GuildChannel): support conversion between text and news (#5022)
* feat(GuildChannel): support conversion between text and news

* fix(Typings): add type to ChannelData

* fix(GuildChannel): use ChannelUpdate action handler to change class type

* Update src/structures/TextChannel.js

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>

* fix(Typings): re-use ChannelType from GuildCreateChannelOptions

* fix(Typings): only allow text-news conversion

* fix(Typings): exclude -> pick (vlads suggestion)

* fix(Typings): pick -> exclude in two other spots

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2021-01-22 18:03:02 +01:00
izexi
eb28ee7905 fix(typings): return types for 'Webhook(Client)#send()' (#4876)
* feat(Typings): add 'APIRawMessage' interface

* fix(Typings): return type for WebhookFields#send()

* fix(Typings): types for APIRawMessage props

* refactor(Typings): exclude oauth props from API

* feat(Typings): add WebhookRawMessageResponse type

* refactor(Typings): use WebhookRawMessageResponse
2021-01-22 17:46:55 +01:00
ElCholoGamer
764966e398 feat(ClientEvents): add tuple labels to event arguments (#5225) 2021-01-22 17:44:11 +01:00
Adrian Paschkowski
c4c817116f feat(GuildMember): #pending (#5121)
* Add GuildMember#isPending

* Rename is_pending to pending

* Improve jsdoc wording

* pending isn't nullable

* ??
2021-01-02 23:55:37 +01:00
Matt (IPv4) Cowley
8c2e6b70b8 refactor(Message): remove stored edit history (#5155) 2020-12-30 11:21:34 +01:00
ManEatingTapir
6a77453532 chore(RoleManager): change parameter of create to be one unnamed object (#5026)
* chore(RoleManager): change parameter of create to be one unnamed object

* chore(RoleManager): update src/managers/RoleManager.js

* chore(RoleManager): update typings/index.d.ts

* chore(RoleManager): update src/managers/RoleManager.js

Co-authored-by: Noel <buechler.noel@outlook.com>
2020-12-26 10:59:16 +01:00
cherryblossom000
40d77bacc3 types: make Client#voice non-nullable (#5148)
Because of the removal of browser support (#5113) Client#voice is always non-nullable.
2020-12-26 10:54:15 +01:00