Commit Graph

839 Commits

Author SHA1 Message Date
n1ck_pro
3b18e5b08d feat(Role): add flags (#9694)
* feat(Role): add `flags`

* types: use RoleFlags enum

* Update packages/discord.js/typings/index.d.ts

Co-authored-by: Jaw0r3k <jaworekwiadomosci@gmail.com>

---------

Co-authored-by: Jaw0r3k <jaworekwiadomosci@gmail.com>
2023-08-10 21:20:13 +00:00
Almeida
692f0fc96d feat(Attachment): add flags (#9686)
* feat(Attachment): add `flags`

* fix: import

* fix: flags casing

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-10 20:53:54 +00:00
Synbulat Biishev
0de071d0a5 feat: add Client#webhooksUpdate (#9732)
* feat: add `Client#webhooksUpdate`

* feat: add deprecation in the types

* docs: add full stops

* types: reference non-deprecated type

This helps with future-proofing (deduplication).

* docs(ClientEvents): fix reference link

This now hyperlinks correctly with IntelliSense.

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-09 14:15:00 +00:00
iCrawl
7295a3a94a chore(discord.js): release discord.js@14.12.1 2023-08-01 02:23:51 +02:00
n1ck_pro
1af7e5a0bb fix(BaseClient): fix destroy method (#9742) 2023-07-31 22:18:11 +00:00
iCrawl
c40f7540cd chore(discord.js): release discord.js@15.0.0 2023-07-31 22:07:38 +02:00
iCrawl
fd8197fe5b chore: deps 2023-07-30 02:13:39 +02:00
Saya
6307f81385 feat: add ws option support for "buildIdentifyThrottler" (#9728)
* feat: add option support for "buildIdentifyThrottler"

* docs: add documentation for buildIdentifyThrottler

* docs: fix example code
2023-07-22 08:57:24 +00:00
iCrawl
d26e022afc chore: deps 2023-07-19 11:59:42 +02:00
iCrawl
afa98793cd chore: deps 2023-07-17 09:45:07 +02:00
Jiralite
e5effb6f6a docs: Change Channel to BaseChannel (#9718)
docs: change `Channel` to `BaseChannel`
2023-07-16 15:06:14 +00:00
Jiralite
125405f1cf docs(BaseChannel): Remove APIChannel (#9717)
docs(BaseChannel): remove `APIChannel`
2023-07-16 14:59:35 +00:00
Aura Román
3c85fb21e6 feat(Client): add guildAvailable event (#9692)
* feat(Client): add `guildAvailable` event

* refactor: sort entries alphabetically

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-15 17:33:47 +00:00
Almeida
8d97017458 feat: user avatar decorations (#8914)
feat(User): add avatar decorations

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-07-13 20:33:38 +00:00
Jiralite
7fb91c57f7 fix(ChannelUpdate): Check against unknown channels (#9697)
fix(ChannelUpdate): check against unknown channels
2023-07-11 18:13:25 +00:00
Aura Román
09b0382c45 perf(Channel): linear speed position getter (#9497)
* perf(Channel): linear speed position getter

* fix: add another set of parens

* perf: lower memory and CPU usage

* refactor: add shared private utility for group types

* perf: improve readability and performance

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

* feat: add support for voice sortables

---------

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-09 20:57:33 +00:00
Jiralite
719e54a921 fix(Action): Use existing recipients if available (#9653)
* fix(Action): use existing recipients if available

* fix: account for message delete -> interaction

* fix(Action): use `last_message_id` if it exists

* refactor(Action): use ternary

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-09 19:30:48 +00:00
Jiralite
ede9f4e5e2 docs(BuildersSelectMenuOption): Update link (#9690)
docs(BuildersSelectMenuOption): update link
2023-07-09 19:26:21 +00:00
MovementGH
df40dcdb85 feat: add silent option to ShardingManager (#9506)
* feat: add silent option to ShardingManager

* chore: update ShardingManagerOptions type

* chore: update typings

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-07-07 23:32:29 +00:00
RedGuy12
53c17e00c0 feat(EmbedBuilder): add .length (#8682)
* feat(Embed): add `.length`

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

* Move to mainlib

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

* types: add typings

---------

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-07 21:53:19 +00:00
Almeida
dc73c938ff feat: guild onboarding (#9120)
* feat: guild onboarding

* feat: types and /core method

* fix: route

* fix: make emoji name non-nullable

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-07 21:48:17 +00:00
Jiralite
a48d0efb09 types(MessageManager): Allow comparison of messages again (#9612)
* types(MessageManager): allow comparison of messages again

* feat: match TypeScript

* docs: update wording

* chore: revert breaking change

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-07 21:39:01 +00:00
GrapeColor
a73d54e43a feat: add resume event in shard (#9650)
Co-authored-by: GrapeColor <grapecolor@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-07 21:34:42 +00:00
Rodrigo Leitão
cf8012c200 refactor(User): remove deprecation warning from tag (#9660)
* refactor(User): remove deprecation warning from tag

* fix: remove unnecessary declarations

* style: fix formatting issue

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-06 16:49:03 +00:00
Synbulat Biishev
0803eb562b fix: everyone role members (#9685)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-06 14:09:31 +00:00
Almeida
766be94b93 chore: bump discord-api-types to 0.37.45 (#9654) 2023-06-15 19:06:52 +00:00
RedGuy12
b61e4fb0dc fix: awaitMessageComponent with MessageComponentInteractions (#8598)
* fix: `awaitMessageComponent` with `MessageComponentInteraction`s

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

* Update packages/discord.js/src/structures/InteractionCollector.js

Co-authored-by: Almeida <almeidx@pm.me>

* types: revert unrelated changes

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

* Remove unneeded truey check

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

* chore: remove extra block

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

* fix: `awaitMessageComponent` with `MessageComponentInteraction`s

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

* fix: `awaitMessageComponent` with `MessageComponentInteraction`s

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

---------

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>
Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-14 18:25:53 +00:00
Jiralite
d64330a157 types(AutoModerationActionExecution): Add forum channels as a possible type in channel() (#9623)
types(AutoModerationActionExecution): type forum channels

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-14 18:14:16 +00:00
RedGuy12
a6dbe163dd fix(ThreadManager): Fix internal crash upon conditionally resolving thread members (#9648)
* fix(ThreadManager): Fix crash

* chore: prettier

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-14 18:07:48 +00:00
Souji
73c2f8aa17 feat(presence): re-introduce image resolving for other platforms (#9637)
* spotify, youtube, twitch
* regression born from misunderstanding in 9a6e691

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-14 17:45:28 +00:00
GrapeColor
a873ec1e85 feat: Add message to send resume event to shard (#9626)
* fix(WebSocketManager): Fix not ready after reconnect

* fix(WebSocketManager): Move fixes from Ready to Resume

* fix: undo changes

* feat: Add message to send resume event to shard

---------

Co-authored-by: GrapeColor <grapecolor@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-14 11:43:23 +00:00
Ryan Munro
8f3bd38072 fix(User): check global name in equals (#9631)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-13 19:17:21 +00:00
ckohen
8f014c65ef chore: unpin rest, unbump node version req (#9632)
* chore: unpin rest, unbump node version req

* chore: update readmes

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-13 19:08:35 +00:00
Rodrigo Leitão
1cab79f6fd types(ModalSubmitFields): components is an array (#9406)
* types(ModalSubmitFields): components is an array

* types(ModalSubmitFields): make type coherent with docs

* refactor(ModalSubmitInteraction): remove undefined props
2023-06-13 20:58:50 +02:00
Jiralite
cd6986854f types: Use readonly arrays and const type parameters in places (#9641)
* types: wrap arrays in `Readonly<>`

* refactor: prefer `readonly` syntax

Co-authored-by: Almeida <almeidx@pm.me>

* types: `const` type parameters

* test: add tests

* fix: fix more instances

---------

Co-authored-by: Almeida <almeidx@pm.me>
2023-06-12 18:00:45 +00:00
Jiralite
6c2242f4f9 types(BaseInteraction): appPermissions not null in guilds (#9601)
types(BaseInteraction): allow `appPermissions` only in guilds

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-09 10:02:22 +00:00
Mogyuchi
75308f2669 fix(WebSocketManager): await WebSocket destroy (#9519)
fix(WebSocketManager): await ws destroy

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-09 09:59:18 +00:00
Ryoh827
911e6eff75 docs(ClientOptions): change default value of sweepers in docs (#9591)
* docs(ClientOptions): change default value of sweepers in docs

* docs(ClientOptions): set sweeper defaults by type

* docs(ClientOptions): add 'this.' to DefaultSweeperSettings in docs

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-09 08:45:42 +00:00
Synbulat Biishev
1ab60f9da4 feat: support new username system (#9512)
* feat: support new username system

* docs(GuildMember#displayName): update

* fix(User#hasNewUsername): use User#discriminator

* feat(User#tag): add new username

* docs(User#tag): update

* docs(User#hasNewUsername): update

* docs: update

* feat(User#defaultAvatarURL): update

* feat: remove some newly added properties

* docs(User#discriminator): update

* docs(User#globalName): bad Copilot

* feat(User#displayName): return display name

* types(User#displayName): not a partial structure

* feat: add `calculateUserDefaultAvatarId` function

* docs(CND#defaultAvatar): update

* docs(CDN#defaultAvatar): update

* feat: change default avatar id to type

* feat: deprecate `User#tag`

* docs(CDN#defaultAvatar): update

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>

* docs(User): update

Co-authored-by: Rodrigo Leitão <38259440+ImRodry@users.noreply.github.com>

* feat: update

* typing: update

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

* feat: change the param type to `Snowflake`

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Rodrigo Leitão <38259440+ImRodry@users.noreply.github.com>
Co-authored-by: Jan <66554238+vaporoxx@users.noreply.github.com>
2023-06-08 18:16:42 +00:00
nopeless
24a61495b9 fix(Client): safe call for possibly null WebSocket (#9600)
fix(client): safe call for possibly null Websocket
2023-05-26 17:27:17 +00:00
Jiralite
e1b6eeed0e docs(Client): Correct invite gateway permission checks (#9597)
docs: correct invite gateway permission checks
2023-05-26 08:18:48 +00:00
Jiralite
53aa24d418 fix(ThreadManager): Ensure fetchActive() only returns active threads in a channel (#9568)
fix(ThreadManager): revert breaking change

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-25 17:16:48 +00:00
iCrawl
9b06734445 chore: deps 2023-05-23 20:14:15 +02:00
Digital
9345d1b1ac fix(LimitedCollection): allow items to be stored if keepOverLimit is true when maxSize is 0 (#9534)
Update LimitedCollection.js

Keep value if it matches the limit.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-22 08:11:47 +00:00
Idris
46167a79d7 refactor(GuildMember): make _roles property non-enumerable (#9387)
* refactor(GuildMember): make _roles a getter and roles a normal prop

* fix: revert changes

* fix: requested changes

* fix: requested changes

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-18 10:13:19 +00:00
iCrawl
90e243d350 chore: deps 2023-05-16 00:14:14 +02:00
Jiralite
7196fe36e8 fix(AutocompleteInteraction): Prevent snake casing of locales (#9565)
* fix(AutocompleteInteraction): prevent snake casing of locales

* fix: avoid unnecessary overhead ops

Co-authored-by: Aura Román <kyradiscord@gmail.com>

---------

Co-authored-by: Aura Román <kyradiscord@gmail.com>
2023-05-12 22:03:10 +00:00
iCrawl
7c8849fae5 chore: deps 2023-05-12 19:58:51 +02:00
Jiralite
d01e8aa8af docs: Fix broken links to new documentation (#9563)
docs: fix broken links
2023-05-12 16:54:25 +00:00
iCrawl
9ddb3ff71d chore: deps 2023-05-07 18:04:10 +02:00