Compare commits

...

1374 Commits

Author SHA1 Message Date
iCrawl
0220fb7278 chore(builders): release @discordjs/builders@1.6.5 2023-08-17 21:40:56 +02:00
iCrawl
6da456767e chore(util): release @discordjs/util@1.0.1 2023-08-17 21:39:49 +02:00
iCrawl
67b30355ea chore(formatters): release @discordjs/formatters@0.3.2 2023-08-17 21:38:59 +02:00
iCrawl
58d9024245 chore(create-discord-bot): release create-discord-bot@0.2.1 2023-08-17 21:38:20 +02:00
iCrawl
5cd6382d1d chore(collection): release @discordjs/collection@1.5.3 2023-08-17 21:35:04 +02:00
iCrawl
fffe625a0c chore(brokers): release @discordjs/brokers@0.2.2 2023-08-17 21:34:23 +02:00
iCrawl
7321c291da chore: revert bump 2023-08-17 21:33:46 +02:00
iCrawl
ab3efb0211 chore(discord.js): release discord.js@14.13.0 2023-08-17 21:31:59 +02:00
iCrawl
7fa9ea3f0f chore: pin discord-api-deps, revert undici 2023-08-17 21:31:04 +02:00
iCrawl
af0f1aa765 chore(discord.js): release discord.js@14.13.0 2023-08-17 21:09:00 +02:00
iCrawl
99cadfd82b chore: deps 2023-08-17 21:08:09 +02:00
Jiralite
8f572a6bad docs(EmbedBuilder): @readonly length (#9778)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-17 19:07:02 +00:00
Jaw0r3k
d90ba8dce8 feat(Client): add deleteWebhook method (#9777)
* feat(Client): deleteWebhook method

* Update packages/discord.js/src/client/Client.js

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

* chore: suggested changes

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-17 16:12:05 +00:00
Jiralite
24fbb11ba2 fix(Action): Do not add the client user as a recipient (#9774)
fix(Action): do not add the client user as a recipient

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-14 17:24:00 +00:00
Jiralite
727dc094d5 types(GuildInvitableChannelResolvable): Allow forum channels (#9775)
types(GuildInvitableChannelResolvable): allow forum channels

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-14 17:19:47 +00:00
Jiralite
d5be4242c6 docs(WebhookEditOptions): Add all of the types (#9776)
docs(WebhookEditOptions): add all the types

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-14 17:16:24 +00:00
Jiralite
c1ff545bf1 fix(DMChannel): Correct partial typo (#9773)
fix(DMChannel): correct partial typo
2023-08-14 17:11:46 +00:00
Toast
188877c50a docs: Update Node.js requirement to 16.11.0 (#9764)
* Update Node.js requirement in README file

* chore: update the rest of files with nodejs 16.11.0

* Update 03-updating-to-v14.mdx

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-08-13 19:49:33 +00:00
Jiralite
a1605b3a5e build: Update vite and other related dependencies (#9772)
* build: update vite and other related dependencies

* chore: use `"errors-only"`
2023-08-13 21:36:23 +02:00
advaith
9ed1b59df6 feat(ClientPresence): allow setting activity state (#9743)
* feat(ClientPresence): allow setting activity state

* fix: add to map

* feat: use name as fallback state
2023-08-12 11:31:29 +00:00
Jaw0r3k
0a9a3ede29 typings: Make activity name required (#9765)
* fix: activity name is required

* chore: add suggested changes

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

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Aura Román <kyradiscord@gmail.com>
2023-08-12 11:12:33 +00:00
ckohen
346fa57f95 fix(CachedManager): allow overriding constructor for makeCache (#9763)
* fix(CachedManager): allow overriding constructor for makeCache

* feat: allow determining makeCache based on non-overriden constructor

* types: cleanup leftovers

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-12 07:08:47 +00:00
Lily Bergonzat
b3c85d34a6 fix(types): fixed CachedManager constructor arguments in type (#9761)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-11 10:04:13 +00:00
Jiralite
d8e37551ce fix(Action): Do not set undefined values (#9755)
fix(Action): do not set `undefined` values

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-11 07:19:59 +00:00
Jiralite
a30d46c5f5 types(BaseButtonComponentData): Narrow component type (#9735)
* types(BaseButtonComponentData): narrow `type`

* test: fix suddenly broken tests

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-11 07:15:05 +00:00
Jiralite
632a9b4965 feat(ClientApplication): Approximate guild count and new GET route (#9713)
* feat: add approx guild count and get route

* refactor: replace route

* docs: update description of class

The replacement route justifies this change.

* feat(ClientApplication): add `approximateGuildCount`

* refactor: revert now-unnecessary changes
2023-08-11 07:11:13 +00:00
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
Jaw0r3k
99194fc270 fix(create-discord-bot): add shebang in main file (#9747)
* fix: no running in cmd

Co-authored-by: ROB0520 <ynoreyesminecraft@gmail.com>

* chore: delete in create-discord-bot file

---------

Co-authored-by: ROB0520 <ynoreyesminecraft@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-09 09:48:58 +00:00
Almeida
cf72d42ea5 ci: upload /formatters test coverage (#9753)
chore: upload /formatters test coverage
2023-08-08 06:44:27 +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
3bc0dce04a chore: fix changelog 2023-07-31 22:17:37 +02:00
iCrawl
c40f7540cd chore(discord.js): release discord.js@15.0.0 2023-07-31 22:07:38 +02:00
iCrawl
1fc9308fef chore(builders): release @discordjs/builders@1.6.4 2023-07-31 21:35:26 +02:00
iCrawl
43d3b48565 chore(create-discord-bot): release create-discord-bot@0.2.0 2023-07-31 21:33:51 +02:00
iCrawl
8d50f2056d chore(core): release @discordjs/core@1.0.0 2023-07-31 21:30:19 +02:00
iCrawl
acc560204f chore(proxy): release @discordjs/proxy@2.0.0 2023-07-31 21:28:52 +02:00
iCrawl
ccf65c2d09 chore(ws): release @discordjs/ws@1.0.0 2023-07-31 21:27:09 +02:00
iCrawl
d04987f09b chore(rest): release @discordjs/rest@2.0.0 2023-07-31 21:24:28 +02:00
iCrawl
ca5a2626b4 chore(collection): release @discordjs/collection@1.5.2 2023-07-31 21:22:35 +02:00
iCrawl
3c5a4dc7a7 chore(util): release @discordjs/util@1.0.0 2023-07-31 21:18:33 +02:00
iCrawl
447652ec8a chore: format 2023-07-31 21:08:13 +02:00
iCrawl
488aa58b29 chore: fixup yarn.lock 2023-07-30 23:16:45 +02:00
iCrawl
a92d19212d ci: publishing dev version semver 2023-07-30 23:08:46 +02:00
iCrawl
fd8197fe5b chore: deps 2023-07-30 02:13:39 +02:00
ckohen
8f4256db8a refactor(REST): remove double classing (#9722)
* refactor(REST): remove double classing

BREAKING CHANGE: `REST` and `RequestManager` have been combined, most of the properties, methods, and events from both classes can now be found on `REST`
BREAKING CHANGE: `REST#raw` has been removed in favor of `REST#queueRequest`
BREAKING CHANGE: `REST#getAgent` has been removed in favor of `REST#agent`

* chore: update for /rest changes
2023-07-25 08:40:21 +00: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
Vlad Frangu
386f206caf feat: no-de-no-de, now with extra buns (#9683)
BREAKING CHANGE: The REST and RequestManager classes now extend AsyncEventEmitter
from `@vladfrangu/async_event_emitter`, which aids in cross-compatibility
between Node, Deno, Bun, CF Workers, Vercel Functions, etc.

BREAKING CHANGE: DefaultUserAgentAppendix has been adapted to support multiple
different platforms (previously mentioned Deno, Bun, CF Workers, etc)

BREAKING CHANGE: the entry point for `@discordjs/rest` will now differ
in non-node-like environments (CF Workers, etc.)

Co-authored-by: Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: suneettipirneni <suneettipirneni@icloud.com>
2023-07-17 08:27:57 +02:00
David Malchin
351a18bc35 feat(create-discord-bot): throw error if the directory is a file (#9719) 2023-07-16 17:38:22 +00:00
Suneet Tipirneni
84f1b1890d feat(create-discord-bot): Add prompts, command handler and deployment script (#9570)
* feat(create-discord-bot): Add prompts, command handler and deployment script

* fix: revert package template name

* chore: make requested changes

* chore: make requested changes

* fix: remove uneeded listeners

* fix: use `0` for eslint

* fix: remaining requested changes

* chore: requested changes

* fix: remove redundant call
2023-07-16 17:13:18 +00: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
David Malchin
bc83cabfda feat(WebhooksAPI): allow with token requests without bot auth (#9715)
* Also move `get`'s `token` parameter to options.
2023-07-16 10:25:29 +00:00
brynpttrsn
20268ac0c4 feat(website): switch overload on hash location (#9699)
* feat(website): switch overload on hash location

* Update apps/website/src/components/OverloadSwitcher.tsx

---------

Co-authored-by: Noel <buechler.noel@outlook.com>
2023-07-15 19:34:28 +02: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
brynpttrsn
4141405dcd fix(website): type alias search symbol (#9705) 2023-07-15 19:25:56 +02:00
David Malchin
8c782bfd52 fix(WebSocketShard): close errors not being catchable (#9704)
* fix(WebSocketShard): close errors not being catchable

* fix(WebSocketShard): requested changes
2023-07-15 10:55:05 +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
DD
ceab07bec8 refactor(WebSocketShard): throttling error handling (#9701)
* refactor(WebSocketShard): handle unknown identify errors

* chore: use better abort check

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-12 17:19:11 +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
David Malchin
78381a56cf feat(ChannelsAPI): add permission overwrites (#9651)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-06 13:55:29 +00:00
Suneet Tipirneni
6d5840c61e fix(core): fix inconsistencies on core (#9680)
* fix(core): fix inconsistencies on `core`

* fix: add `createForumPost` back

* fix: create -> createWebhook
2023-07-06 13:35:10 +00:00
ShadowAya
75d91b52b3 setNameLocalization typo (#9656)
fix JSDoc typo in NameAndDescription.ts > setNameLocalization
2023-06-17 14:29:35 +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
Jiralite
2818d7cc1d fix(client): Add missing application command permissions update event (#9639)
fix(client): add missing event

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-14 18:11:00 +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
dependabot[bot]
db925fa269 build(deps-dev): bump vite from 4.3.8 to 4.3.9 (#9625)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.3.8 to 4.3.9.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.3.9/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-13 19:20:07 +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
brynpttrsn
1716202f44 fix(website): Overload switcher duplicates reference links (#9614)
fix(website): add idx to link key
2023-06-13 21:01:18 +02: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
brynpttrsn
7b494aca5b fix(website): switch signature with overload (#9643) 2023-06-13 20:55:56 +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
İbrahim
bc2798b8ee docs: Define /core token in example (#9586)
* Importing Token

Importing token was missing, so I added it. It is getting the token from configuration file. 

It could have been done with defining a constant variable too, but importing makes more sense.

* Updated Token Field to "dotenv"

From now, user's can use dotenv package to keep their Discord client token.

* Referring token as DISCORD_TOKEN

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

---------

Co-authored-by: Jaw0r3k <jaworekwiadomosci@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-09 09:41:07 +00:00
volcanofr
a531dc9f1c RESTOptions: (really) small description update for cdn (#9615)
Small option update cnd REST.ts

I just add "``" to uniform cdn @defaultValue with others one (like api).
The link is not broken anymore, because it do not work anymore.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-09 09:00:20 +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
Qjuh
df8b6e9934 fix(WebSocketManager): always cache result of fetchGatewayInformation (#9611)
* fix(WebSocketManager): always cache result of fetchGatewayInformation

* fix: add comment
2023-05-29 18:45:17 +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
Jiralite
47843493a5 feat(guide): Add formatters popular topic (#9566)
* feat: add formatters page

* chore: rename pages
2023-05-22 10:06:48 +02:00
David Malchin
6c7a5ed1e7 fix(api): various fixes for overlooked stuff (#9588)
* types(GuildsAPI): fix `getWidgetSettings()` result type

* types(GuildsAPI): fix `beginPrune()` result type

* types(GuildsAPI): fix `editAutoModerationRule()` result type

* types(ApplicationCommandsAPI): fix guild application types

* types(GuildsAPI): fix `createTemplate()` body type

* fix(InteractionsAPI): make `followUp()` return the message

According to the Discord docs, creating a followup message is the same as executing a webhook, but *wait is always true*, meaning we always get the message.

* types(WebhooksAPI): fix result types
2023-05-22 07:59:57 +00:00
Jaw0r3k
985def3f25 feat(api): add stage instances (#9578)
* feat(core): add stage instances

* chore: use one import

* Apply suggestions from code review

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

* chore: requested changes

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

* Apply suggestions from code review

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

---------

Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: David Malchin <malchin459@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-05-19 19:18:33 +00:00
Jiralite
1c4a12c7d6 types: use Snowflake instead of string for snowflakes (#9583)
fix: use `Snowflake` not `string`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-19 17:33:43 +00:00
brynpttrsn
8107c5c0e7 fix(website): header and sidebar icons (#9574)
* fix: header icons

* Reorder imports

* remove field symbol

* fix type sidebar icon

* remove import

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-19 17:28:37 +00:00
Aura Román
b85a3f2dde refactor(collection): reduce reduce's code (#9581)
* refactor(collection): reduce `reduce`'s code

* fix: resolved bug in tests

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-18 21:05:48 +00:00
David Malchin
3535321b98 fix(GuildsAPI): use level rather than mfa_level when editing MFA (#9584) 2023-05-18 17:03:09 +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
Idris
cffa5d19c9 feat(guide): port Collectors page (#9567)
* feat(guide): port Collectors page

* fix: requested changes

* fix: requested changes

* fix: suggested changes

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-18 09:06:00 +00:00
David Malchin
5d6eed6414 feat(GuildsAPI): add removeMember() (#9576) 2023-05-16 09:37:06 +00:00
iCrawl
90e243d350 chore: deps 2023-05-16 00:14:14 +02:00
David Malchin
590f5bc38e feat(api): add getMemberBans() query options and getMemberBan() (#9569) 2023-05-14 07:40:04 +00: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
5351ab429b build(ui): tree-shake ui components 2023-05-12 20:20:42 +02:00
iCrawl
d033f925e0 fix(websites/guide): remove flex-basis 2023-05-12 20:02:04 +02:00
iCrawl
13073acefc fix(ui): expose options for discord components 2023-05-12 20:00:02 +02: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
DD
4dcc9c50f8 fix(WebSocketShard): handle initial connect being a resume (#9549)
* fix(WebSocketShard): handle initial connect being a resume

* chore: remove leftover

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-11 17:42:10 +00:00
Jiralite
a51c48e743 fix(webhooks): Remove incorrect properties in edit message code sample (#9562)
fix(webhooks): remove incorrect properties in edit message code sample
2023-05-11 16:43:54 +00:00
Jiralite
1edd01a7a4 feat(client): Support more request member fields (#9475)
feat(client): support more request member fields

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-10 16:40:52 +00:00
Jiralite
7b617bd22e feat: Create discord-api-types documentation component (#9555)
feat: add discord-api-types link component

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-09 19:49:07 +00:00
brynpttrsn
0c175c02e9 fix(website): package and version button formatting (#9556)
* fix for djs package button and removed redundant divs

* version arrow formatting

* formatting
2023-05-09 16:02:52 +02:00
Jiralite
460ac7dfe2 chore: Add repository directory (#9552)
chore: add repository directory
2023-05-08 17:12:31 +00:00
Jiralite
64324a8be1 feat: Check for empty directory (#9539)
* feat: check for empty directory

* fix: correct error

Co-authored-by: space <spaceeec@yahoo.com>

---------

Co-authored-by: space <spaceeec@yahoo.com>
2023-05-08 09:00:09 +02:00
Jiralite
b6162bc5b5 fix: Resolve imports for Windows (#9546)
fix: windows why

Co-authored-by: DD <didinele.dev@gmail.com>
Co-authored-by: Almeida <almeidx@pm.me>
2023-05-08 08:59:53 +02:00
synicalsyntax
280ed0ce08 fix(website): various UI improvements (#9538)
* fix(website): raise category z-index to prevent clipping

* refactor(website): wrap footer badges when necessary to prevent overflow
2023-05-08 08:59:25 +02:00
Jaw0r3k
5b8d535fd6 fix: Non-existing data property (#9544)
fix: not existed data prop

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-07 19:39:43 +00:00
Almeida
c4a3120354 feat(create-discord-bot): inherit stdio when installing deps (#9543) 2023-05-07 19:27:33 +00:00
Jaw0r3k
8482e3c95d fix(create-discord-bot): Fix start script (#9542)
fix: not working npm start

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-07 19:08:23 +00:00
Superchupu
12482b70ed docs: add Cloudflare sponsorship in create-discord-bot readme (#9540)
chore: add cloudflare sponsorship in `create-discord-bot` readme
2023-05-07 18:47:46 +00:00
iCrawl
fa746b079d chore: patch tsup 2023-05-07 19:17:10 +02:00
iCrawl
fc3f0756a4 chore: configs 2023-05-07 18:26:46 +02:00
iCrawl
3bfb6197a0 chore(create-discord-bot): release create-discord-bot@0.1.0 2023-05-07 18:13:04 +02:00
iCrawl
5ecc4f13b5 chore: re-gen yarn.lock 2023-05-07 18:10:56 +02:00
Jiralite
f83a8a58c9 feat: create-discord-bot (#9420)
* feat: basic initialisation

* fix: no scope

* chore: add options for issues

* feat: good word, Monbrey

* feat: basic README.md

* fix: no documentation for this

* feat: install for them

* chore: update licencing

* chore: fix year

* fix: build tsup

* feat: add TypeScript option

* feat: add `name` option

* chore: ignore annoying errors

* chore: add tsconfig.json

* refactor: remove name

We can just use the name of the directory instead.

* chore: update cliff jumper rc

* chore: bump dependencies

* chore: bump dependencies

* fix: build in prepack

* fix: configure ESLint correctly

* feat: infer package manager

* docs(packageManager): document `install()`

* fix(packageManager): do not emit a warning for `npm`

* refactor: change project name colour to yellow

* docs(constants): basic documentation

* feat: add link

* chore: add `verbatimModuleSyntax`

* chore: bump discord.js

* refactor: switch to @sapphire/ts-config

* refactor: file name changes

* refactor: tweak description

* chore: update yarn.lock

* fix: add .env

* chore: bump dependencies

* feat: event handler

* refactor: use `default`

* refactor: simpler event

* chore: bump discord.js

* fix: add release script and reorder

* style: reorder package.json

* chore: remove unneeded ignores

* chore: bump minimum Node.js version

* chore: add @types/node to TypeScript package.json

* chore: apply requested changes

Co-authored-by: Noel <buechler.noel@outlook.com>

* style: run ESLint + Prettier

* refactor: prefer "the"

* refactor: remove some comments

* feat: add ESLint + Prettier

* chore: requested changes

Co-authored-by: Noel <buechler.noel@outlook.com>

* chore: more requested changes

Co-authored-by: Noel <buechler.noel@outlook.com>

---------

Co-authored-by: Noel <buechler.noel@outlook.com>
2023-05-07 18:05:26 +02:00
iCrawl
9ddb3ff71d chore: deps 2023-05-07 18:04:10 +02:00
Superchupu
7ce6bb99e9 chore(deps): pin @discordjs/ws version in discord.js (#9533)
* chore(discord.js): pin `@discordjs/ws` version

* chore: update lockfile
2023-05-07 16:40:19 +02:00
Jiralite
da6de92e8c feat(DocsLink): Support overriding text (#9525) 2023-05-07 16:22:05 +02:00
synicalsyntax
bbf80efbb0 fix(guide): various UI improvements (#9532) 2023-05-07 16:20:54 +02:00
Synbulat Biishev
227232112d feat(GuildAuditLogsEntry#extra): add missing channel property (#9518)
* feat(GuildAuditLogsEntry#extra): add missing `channel` property

* types(GuildAuditLogsEntryExtraField): update

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-05-07 00:55:02 +00:00
Jaw0r3k
37181ab232 perf(Role): improve members getter (#9529)
perf(Role): improve members
2023-05-06 23:37:43 +00:00
ckohen
cdaa0a36f5 refactor(rest): switch api to fetch-like and provide strategies (#9416)
BREAKING CHANGE: NodeJS v18+ is required when using node due to the use of global `fetch`
BREAKING CHANGE: The raw method of REST now returns a web compatible `Respone` object.
BREAKING CHANGE: The `parseResponse` utility method has been updated to operate on a web compatible `Response` object.
BREAKING CHANGE: Many underlying internals have changed, some of which were exported.
BREAKING CHANGE: `DefaultRestOptions` used to contain a default `agent`, which is now set to `null` instead.
2023-05-06 21:09:19 +02:00
iCrawl
fc5b9c523b ci: positional arguments 2023-05-06 17:00:27 +02:00
iCrawl
256b68bf9f ci: pass push arguments to buildx 2023-05-06 16:54:08 +02:00
Jiralite
75195cc539 chore(guide): Update discord.js version to 14.11.0 (#9523) 2023-05-06 14:57:13 +02:00
DD
8d5ce32080 fix(proxy-container): docker builds (#9524) 2023-05-06 13:59:14 +02:00
iCrawl
5bfcf93e29 chore(discord.js): release discord.js@14.11.0 2023-05-06 11:06:10 +02:00
iCrawl
28f51791a2 chore(ws): release @discordjs/ws@0.8.3 2023-05-06 11:05:18 +02:00
DD
e6274681fd fix(WebSocketManager): properly emit shard error events (#9521)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-05 20:17:05 +00:00
DD
00da44a120 fix(WebSocketShard): wait a little before reconnecting (#9517)
* fix(WebSocketShard): wait a little before reconnecting

* chore: leftover comment

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-05 20:14:53 +00:00
Mateusz Burzyński
ab39683a50 chore: "hide" ./defaultWorker entrypoint with types: null (#9485)
* fix: move `types` condition to the front

* Update packages/ws/package.json

---------

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-05-05 20:08:12 +00:00
DD
3e80f0b384 tests(ws): fix tests (#9520) 2023-05-05 22:01:28 +02:00
iCrawl
e53b94c979 chore: remove cron 2023-05-05 21:21:09 +02:00
Almeida
6b2c3fb9d0 feat(Guild): safety alerts channel and mention raid protection (#8959)
* feat(Guild): add safety alerts channel and mention raid protection

* docs: add missing tag

* fix: keep other properties in triggerMetadata

* docs(Guild): update example usage

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-05-05 18:39:58 +00:00
iCrawl
d8d21cf370 chore: cloudflare sponsorship 2023-05-05 20:29:10 +02:00
Aura Román
8e9a2b4630 perf(Role): linear speed position getter (#9493)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-05-05 12:49:00 +00:00
iCrawl
d4f12e0a0c chore: deps 2023-05-05 14:30:47 +02:00
Jiralite
d7b18f0681 types(StringSelectMenuComponentData): options is required (#9515)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-05 12:28:39 +00:00
Jiralite
166c961261 fix(roleConnections): Fix body type for updateMetadataRecords() (#9516) 2023-05-05 09:42:12 +02:00
Jiralite
506f7fcd3b fix(guide): Fix unknown component in v14 update guide (#9514)
* chore(constants): update discord.js to 14.10.2

* feat(DocsLink): handle only a package

* fix(updating-to-v14): fix unknown component
2023-05-05 07:37:47 +00:00
Jiralite
51d53f5117 feat(guide): Add webhooks (#9479)
* feat: add page

* feat: add assets

* chore: DocsLink

Co-authored-by: Ryan Munro <monbrey@gmail.com>

* fix: config import

* fix: another assert bug

* chore: lint

* fix: actually fix the destructure

---------

Co-authored-by: Ryan Munro <monbrey@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-04 08:49:18 +00:00
Idris
aa32d67619 chore(voice-description): being consistency with Node.js casing (#9505)
docs(voice-description): being consistency with Node.js casing

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-04 08:44:35 +00:00
Suneet Tipirneni
4b077e679c refactor(guide): use @type comments for command data code (#9489)
* refactor(guide): use `@type` comments for command data code

* fix: typo

* fix: use correct doc comment

* fix: use one line

* feat: add param types

* fix: use command interaction instead

* Update apps/guide/src/content/03-creating-your-bot/03-adding-commands.mdx

Co-authored-by: Souji <timoqueezle@gmail.com>

* chore: lint

---------

Co-authored-by: Souji <timoqueezle@gmail.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-05-03 23:58:53 +00:00
iCrawl
c190c57d64 chore: re-apply patches 2023-05-03 18:25:20 +02:00
Jaw0r3k
423bfce286 docs: Add bug/feature form for ui and util (#9504)
feat: add tags for other packages
2023-05-03 16:20:09 +00:00
iCrawl
5d05b7230a chore: re-gen yarn.lock 2023-05-03 02:30:15 +02:00
iCrawl
7e875f6919 chore: refactor workspace 2023-05-03 02:14:22 +02:00
Qjuh
c429763be8 fix(WebSocketManager): emit raw ws events again (#9502) 2023-05-02 19:49:55 +00:00
Jiralite
1b7981e469 docs(Client): Update Sapphire's snowflake utility links (#9501) 2023-05-02 12:56:38 +02:00
Aura Román
f2ad0762c5 refactor(GuildChannel): simplify constructor (#9499) 2023-05-02 10:32:47 +00:00
iCrawl
6d7f3b0f5c chore(discord.js): release discord.js@14.10.2 2023-05-02 01:18:23 +02:00
Almeida
201b002ad4 fix: correct isJSONEncodable() import (#9495)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-05-01 22:25:51 +00:00
Almeida
b327f4925f fix(Client): generateInvite() scope validation (#9492) 2023-05-01 22:11:11 +00:00
iCrawl
e262df9117 chore(discord.js): release discord.js@14.10.1 2023-05-01 23:50:16 +02:00
iCrawl
7a761d4cfb chore: properly use cjs in module 2023-05-01 23:49:59 +02:00
iCrawl
ac9bf3ac06 fix(Client): spelling of InvalidScopesWithPermissions 2023-05-01 23:49:32 +02:00
iCrawl
133a6bbf49 chore(builders): release @discordjs/builders@1.6.3 2023-05-01 23:35:14 +02:00
iCrawl
63fc9f8504 chore(util): release @discordjs/util@0.3.1 2023-05-01 23:34:16 +02:00
Almeida
a9f2bff82a refactor(ShardClientUtil): logic de-duplication (#9491)
added docs to the `calculateShardId` function
2023-05-01 20:08:45 +00:00
Almeida
54ceedf6c5 refactor: remove @discordjs/util re-export (#9488) 2023-05-01 21:47:30 +02:00
Jiralite
36b7fb2f00 feat(guide): Update to 14.10.0 (#9487) 2023-05-01 21:05:29 +02:00
iCrawl
9a56edaf8c chore: add module resolution for the website 2023-05-01 18:21:02 +02:00
iCrawl
be81c8bf3b chore(discord.js): release discord.js@14.10.0 2023-05-01 17:42:07 +02:00
iCrawl
c77a1765c4 chore(core): release @discordjs/core@0.6.0 2023-05-01 17:35:40 +02:00
iCrawl
3665ad65d0 chore(ws): release @discordjs/ws@0.8.2 2023-05-01 17:34:27 +02:00
iCrawl
d4de1cd09e chore(proxy): release @discordjs/proxy@1.4.1 2023-05-01 17:31:00 +02:00
iCrawl
481bbc924f chore(rest): release @discordjs/rest@1.7.1 2023-05-01 17:29:19 +02:00
iCrawl
ca81e61b4c chore(formatters): release @discordjs/formatters@0.3.1 2023-05-01 17:24:36 +02:00
iCrawl
eb603c0d11 chore(util): release @discordjs/util@0.3.0 2023-05-01 17:22:55 +02:00
iCrawl
072c9da5df chore(collection): release @discordjs/collection@1.5.1 2023-05-01 17:20:16 +02:00
iCrawl
cd591327d6 chore(builders): release @discordjs/builders@1.6.2 2023-05-01 17:16:31 +02:00
iCrawl
71e67d8c97 chore(brokers): release @discordjs/brokers@0.2.1 2023-05-01 17:15:29 +02:00
Qjuh
a9e0de4288 refactor(WebSocketManager): use /ws package internally (#9099) 2023-05-01 17:08:23 +02:00
iCrawl
c5b4423a5a ci: properly add all tsconfig options 2023-05-01 16:44:36 +02:00
iCrawl
47b08be509 ci: fix start scripts for actions 2023-05-01 16:34:56 +02:00
iCrawl
2e0804ae92 ci: update node version 2023-05-01 16:27:29 +02:00
iCrawl
71983cc5d1 ci: make package optional for docs upload 2023-05-01 16:02:05 +02:00
iCrawl
0f3d870ce6 ci: properly look for docs 2023-05-01 15:57:28 +02:00
iCrawl
ce4e1fc2c6 ci: dramatically speed up docs building 2023-05-01 15:55:14 +02:00
iCrawl
0762ddb3f4 chore: deps 2023-05-01 15:29:51 +02:00
iCrawl
80af9696d3 build: leftover extensions 2023-05-01 15:23:15 +02:00
iCrawl
48cab844d4 build: switch to bundler moduleResolution 2023-05-01 13:14:13 +02:00
iCrawl
8b71f44b1f chore: deps 2023-05-01 12:05:55 +02:00
Almeida
f27631175a feat(ui): support embed image, thumbnail, author url, and url (#9478) 2023-04-30 16:56:34 +02:00
GrapeColor
ad217cc760 fix(ShardClientUtil): Fix client event names (#9474)
Co-authored-by: GrapeColor <grapecolor@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-30 10:16:44 +00:00
iCrawl
1ba7394a7d chore: deps 2023-04-30 09:01:17 +02:00
Jiralite
260c46d51c feat(guide): Add audit logs (#9429) 2023-04-30 07:50:14 +02:00
iCrawl
6229597db2 fix(guide): add more headings 2023-04-29 20:10:06 +02:00
iCrawl
8d212e4859 feat(guide): anchor links 2023-04-29 20:05:22 +02:00
iCrawl
51e8f02ef7 fix(ui): author and reply author spacing 2023-04-29 17:44:02 +02:00
Tetie
496c4e2884 feat(ui): support verified bots and colored authors (#9471)
Co-authored-by: Noel <buechler.noel@outlook.com>
2023-04-29 17:26:31 +02:00
Jiralite
77191a2e7b docs: Add new issue form for applications (#9470) 2023-04-28 21:47:19 +02:00
Jiralite
375483b0f9 feat(guide): Add threads (#9430) 2023-04-28 21:46:45 +02:00
Jiralite
17cd4b610a fix(guide): Show rest of TypeScript code block (#9465) 2023-04-28 21:46:27 +02:00
Suneet Tipirneni
988f8c7546 refactor(website): consolidate styling for buttons (#9466) 2023-04-28 21:42:47 +02:00
Jiralite
217e5d8100 fix(BaseClient): Prevent user agent mutation (#9425)
fix(BaseClient): prevent user agent mutation
2023-04-28 17:46:50 +00:00
Jaw0r3k
40d07fbbbd fix(BitField): use only enum names in iterating (#9357)
* fix: use only names in iterating bitfield

* fix: not a number

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

* fix: serialize

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>

---------

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-28 17:25:11 +00:00
anandre
1b15d31b5a docs(AutoModerationRule): update docs (#9464)
* Update AutoModerationRule.js

Update the docs descriptions for some of the AutoModerationRule methods to make them clearer and easier to understand

* Update AutoModerationRule.js

Updated the `exemptRoles` and `exemptChannels` parameter descriptions for their respective helper methods to match the typedef `AutoModerationRuleEditOptions`.

* Update AutoModerationRule.js

Update the `mentionTotalLimit` description to match the one in the `AutoModerationTriggerMetadataOptions` typdef.

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

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-04-28 17:19:14 +00:00
Idris
d26df5faba types(AutoModerationActionMetadataOptions): make channel property optional (#9460)
* refactor(GuildMember): make _roles a getter and roles a normal prop

* types(AutoModerationActionMetadataOptions): make channel property optional

* fix: revert changes from another PR

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-28 17:13:27 +00:00
Ryan Munro
78fe247fc4 feat(guide): port and update lots of stuff (#9385)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Noel <buechler.noel@outlook.com>
2023-04-27 20:58:25 +02:00
RanAS
36216c0e1a docs: include StreamType enum description in new docs (#9457) 2023-04-27 20:29:27 +02:00
Jiralite
6212bffa30 docs: Update example usage (#9461) 2023-04-27 20:28:44 +02:00
Suneet Tipirneni
b2e1bb92d0 fix(website): don't duplicate overloaded methods (#9462) 2023-04-27 20:25:23 +02:00
Almeida
2e09cb4c1f feat(ui): support embed fields, footer icon, and timestamp (#9442) 2023-04-25 19:05:14 +02:00
Michael H
1b4d34cebf chore: Add directory to package.json (#9456)
* chore: Add directory to package.json

* fix: run fmt

* fix: undo formatting
2023-04-25 14:27:44 +00:00
iCrawl
8153ca99ee ci: update formatting tag 2023-04-24 20:19:40 +02:00
iCrawl
43e205b840 chore: deps 2023-04-24 19:46:44 +02:00
Jiralite
c6ca5a83e7 docs(APITypes): Document role & user select menu components (#9435)
docs(APITypes): document select menu components

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-21 20:56:51 +00:00
Jiralite
5c52bb9590 docs(BaseMessageOptions): Fix embeds and components (#9437)
docs(BaseMessageOptions): fix embeds and components

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-21 20:43:17 +00:00
DD
a49ed0a2d5 refactor(proxy): rely on auth header instead (#9422)
* refactor(proxy): rely on auth header instead

* chore: typo

* chore: language

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

* chore: more language

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

* chore: more language nitpicks

Co-authored-by: ckohen <chaikohen@gmail.com>

* fix: unnecessary async

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: ckohen <chaikohen@gmail.com>
2023-04-21 20:36:15 +00:00
Almeida
3e01f91bbb feat(Attachment): voice messages (#9392)
Co-authored-by: Tetie <tjvssr@gmail.com>
2023-04-21 11:09:37 +02:00
anandre
7d341000d4 docs(InteractionResponses): showModal docs change (#9434)
* Update InteractionResponses.js

Update the parameters for the showModal method

* Update APITypes.js

Add APIModalInteractionResponseCallbackData link for docs link for showModal method

* Update InteractionResponses.js

Change the order of parameters so the ModalBuilder is listed first

* Update APITypes.js

Disable the ESline line length rule for the APITypes file

* Update InteractionResponses.js

Add ModalComponentData to the JSDoc, it was omitted before.
2023-04-21 08:17:44 +00:00
Jiralite
b49c5c9f48 ci: Fix issue triage (#9433) 2023-04-20 20:41:21 +02:00
MrMythicalYT
ce287f21d1 docs: use ESM code in examples (#9427)
* docs(Partials): use import statement

* docs: update readme to ESM

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-20 06:40:15 +00:00
MrMythicalYT
d6bca9bb4d docs: reference package names properly (#9426) 2023-04-20 06:25:32 +00:00
Jiralite
a2ab2b8717 feat(scripts): Sort issue labels (#9423)
feat(scripts): sort issue labels

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-19 20:09:05 +00:00
Suneet Tipirneni
ecd1b5da11 refactor(website): consolidate badge logic (#9417)
Co-authored-by: Noel <buechler.noel@outlook.com>
2023-04-19 18:58:35 +02:00
Jiralite
0eb866357b ci: Update actions (#9424) 2023-04-19 18:57:16 +02:00
Almeida
d2d27ce734 fix: use new permission name (#9274)
* fix: use new permission name

* docs: requested changes

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-19 14:32:07 +00:00
Jiralite
603446a692 chore: Bump dependencies for template package (#9418)
* chore: bump dependencies

* chore: update .yarnrc.yml
2023-04-19 05:43:46 +00:00
Suneet Tipirneni
f1fdd5b010 refactor(website): extract shared code heading styling into component (#9414)
* refactor(website): extract shared code heading styling into component

* chore: remove redundant variable
2023-04-17 21:33:51 +00:00
DD
5d1a4c27d5 feat(core): abstract gateway (#9410)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-17 20:05:05 +00:00
iCrawl
98a76db482 docs: generate static imports for types with api-extractor 2023-04-17 19:08:01 +02:00
Suneet Tipirneni
516c46117c feat(website): use tsdoc parameter names wherever possible (#9413)
Co-authored-by: Noel <buechler.noel@outlook.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-17 18:44:17 +02:00
Tetie
7d7972d239 chore(Client): robust error checking (#9390)
* chore: robust error checking

* fix: check for null

* chore: add period

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

* fix: check for undefined correctly

* chore: robust error checking

* fix: check for null

* chore: add period

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

* fix: check for undefined correctly

* fix: check for null

* fix: update typings

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-04-17 15:05:32 +00:00
Jiralite
7b10e8cb63 feat: Add FAQ (#9407)
* feat: port over FAQ

* refactor: use async/await

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

* style: spacing

* refactor: use role id

* feat: more links!

* refactor: move comment up

* refactor: consistent naming style

---------

Co-authored-by: Almeida <almeidx@pm.me>
2023-04-17 08:31:53 +00:00
Jiralite
2f18323d2c fix(updating-to-v14): Parameter typo (#9408)
fix: parameter typo
2023-04-17 01:35:34 +00:00
Suneet Tipirneni
e04801bba1 fix(website): add equals to enum members (#9405) 2023-04-16 21:43:37 +00:00
iCrawl
09a9fb57e0 chore(core): release @discordjs/core@0.5.2 2023-04-16 23:02:41 +02:00
iCrawl
025b7aea29 chore(core): release @discordjs/core@0.5.1 2023-04-16 22:58:25 +02:00
iCrawl
7aa5ea731f chore(ws): release @discordjs/ws@0.8.1 2023-04-16 22:54:15 +02:00
iCrawl
f883279ab3 ci: re-add pr triage for labels 2023-04-16 22:50:43 +02:00
iCrawl
f1b2dec8e1 chore: add codeowners 2023-04-16 22:38:38 +02:00
Aura Román
0a1701b046 types(ChannelsAPI): use correct type for editMessage (#9399)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-16 18:27:16 +00:00
Jiralite
5dcc6df224 fix(updating-to-v14): Prioritise JavaScript (#9401) 2023-04-16 20:22:41 +02:00
Jiralite
1c35425120 fix(collection): filter() markdown (#9402) 2023-04-16 20:21:47 +02:00
Jiralite
cf1f5c0f0c chore(async-await): Update to ESM (#9403) 2023-04-16 20:21:30 +02:00
iCrawl
a210fc64a2 fix(website): dark mode text color 2023-04-16 19:21:41 +02:00
iCrawl
24f17998c8 refactor(website): revise landing page 2023-04-16 19:10:50 +02:00
iCrawl
eda118dae9 fix(guide): optimize redirects on middleware level 2023-04-16 17:42:05 +02:00
iCrawl
f2fce0a7da refactor(guide): always redirect to introduction 2023-04-16 17:38:45 +02:00
Jiralite
29389e39f4 feat(BaseInteraction): Support new channel payload (#9337)
* feat(BaseInteraction): support new channel payload

* refactor(InteractionCreate): different approach

Co-Authored-By: Synbulat Biishev <contact@syjalo.dev>

---------

Co-authored-by: Synbulat Biishev <contact@syjalo.dev>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-16 14:28:32 +00:00
iCrawl
d5e9e36e8a fix(guide): let the breadcrumbs grow to the full size 2023-04-16 13:29:55 +02:00
iCrawl
8c0eb56ba5 fix(guide): ring cutoff on guide header 2023-04-16 13:02:10 +02:00
iCrawl
1b74c774c0 fix(website): cutoff ring outline in breadcrumbs 2023-04-16 11:22:16 +02:00
iCrawl
01949d6e3a fix(website): wrong breakpoint 2023-04-16 00:23:33 +02:00
iCrawl
3ea26cc1a6 refactor(website): only show search box on md and up 2023-04-16 00:17:12 +02:00
Suneet Tipirneni
a516d46f91 fix(website): right-align search bar (#9395) 2023-04-16 00:03:19 +02:00
iCrawl
b35b935679 fix(guide): sidebar types 2023-04-15 23:50:18 +02:00
iCrawl
0928c8f6ff fix(guide): remove astro leftovers 2023-04-15 23:37:19 +02:00
iCrawl
188d5eea28 chore: fix yarn.lock 2023-04-15 23:31:48 +02:00
iCrawl
412e4fffae build(website): prepare for turbopack 2023-04-15 18:15:24 +02:00
iCrawl
5e2f94c591 fix(website): max height 2023-04-15 14:28:20 +02:00
iCrawl
49627b1f46 chore(website): add banner 2023-04-15 14:03:03 +02:00
iCrawl
bcb48fea3e chore(website): redirect to core instead 2023-04-15 13:03:27 +02:00
iCrawl
c87e826087 style(website): remove dynamic width check 2023-04-15 04:43:23 +02:00
Ben
2dddbe1f32 feat(RoleTagData): add guildConnections (#9366)
* feat(roleTagData): add guildConnections

* feat(roletagdata): add guildConnections

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

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

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: space <spaceeec@yahoo.com>
2023-04-14 22:04:57 +00:00
Almeida
86e5f5a119 docs(Options): fix links and invalid syntax (#9322)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-14 21:49:51 +00:00
BoogeyMan
300059cb26 docs: cleanup MessageCreateOptions and MessageReplyOptions (#9283)
* Fixed MessageReplyOptions

* updated MessageReplyOptions

* Deduplication - created BaseMessageCreateOptions

* Update packages/discord.js/src/structures/interfaces/TextBasedChannel.js

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

* Fixed spacing

---------

Co-authored-by: Jaw0r3k <jaworekwiadomosci@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-14 21:46:15 +00:00
Erwan
d4c1fecbe2 fix(Message#editable): fix permissions check in locked threads (#9319)
fix(Message#editable): fix permissions check if channel is thread & locked

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-14 21:42:54 +00:00
Jiralite
79bcdfa767 docs(Events): Document auto moderation events (#9342)
docs(Events): document auto moderation events

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-14 21:39:35 +00:00
Jiralite
ca4de2d9c6 fix(BaseSelectMenuBuilder): Modify class to be abstract (#9358)
fix(BaseSelectMenuBuilder): abstraction

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-14 21:34:55 +00:00
Jiralite
794abe8450 refactor: Remove fromInteraction in internal channel creation (#9335)
refactor: remove `fromInteraction`
2023-04-14 21:29:27 +00:00
DD
02dfaf1aa2 refactor: abstract identify throttling and correct max_concurrency handling (#9375)
* refactor: properly support max_concurrency ratelimit keys

* fix: properly block for same key

* chore: export session state

* chore: throttler no longer requires manager

* refactor: abstract throttlers

* chore: proper member order

* chore: remove leftover debug log

* chore: use @link tag in doc comment

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

* chore: suggested changes

* fix(WebSocketShard): cancel identify if the shard closed in the meantime

* refactor(throttlers): support abort signals

* fix: memory leak

* chore: remove leftover

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-14 20:26:37 +00:00
Suneet Tipirneni
cac3c07729 fix(website): link dapi-types to proper website (#9388) 2023-04-14 20:53:57 +02:00
iCrawl
83143178aa ci: remove nextjs bundle analysis 2023-04-14 20:10:26 +02:00
iCrawl
615752e32b chore(website): cleanup ts-errors 2023-04-14 20:03:40 +02:00
iCrawl
2c25639a85 chore: update next.js dep 2023-04-14 19:23:59 +02:00
iCrawl
a76c1ddacc chore: fixup build and lint 2023-04-14 17:11:12 +02:00
Jiralite
0d0e4d1cb6 feat: Add changes from v13 to v14 (#9384) 2023-04-14 10:58:23 +02:00
iCrawl
d35f670d7a chore(website): move around static label 2023-04-14 10:33:20 +02:00
iCrawl
e4c5f794b0 fix(website): client-side rendering fallback 2023-04-13 23:29:45 +02:00
Jiralite
88cab1a0ec fix: Update DocsLink usage (#9382) 2023-04-13 22:55:15 +02:00
iCrawl
1c2cc09e05 fix(guide): temporary fix contentlayer dev 2023-04-13 22:28:33 +02:00
Jiralite
2a684361d4 fix(guide): Treeshake react-icons (#9381) 2023-04-13 22:09:40 +02:00
Almeida
66dc4014fe fix(interactions): make data parameter optional (#9379) 2023-04-13 22:01:08 +02:00
Jiralite
39c6694561 feat(DocsLink): Implement the component (#9380)
Co-authored-by: Noel <buechler.noel@outlook.com>
2023-04-13 21:55:15 +02:00
iCrawl
70da3746f8 fix(website): static badge and overload switcher 2023-04-13 20:56:44 +02:00
iCrawl
0340622f1a fix(ui): discord components 2023-04-13 20:15:59 +02:00
iCrawl
f36878677c chore: add chromatic 2023-04-13 19:41:23 +02:00
iCrawl
e5859b41cf chore: storybook 2023-04-13 19:09:56 +02:00
Jiralite
8218ffc78d types(CategoryChannel): Ensure parent and parentId are null (#9327)
types: ensure categories' parents are `null`
2023-04-13 16:10:53 +00:00
Jiralite
7ff3d528d9 types(GuildTextBasedChannel): Remove unnecessary exclusion of forum channels (#9326)
types(GuildTextBasedChannel): remove exclusion of forum channels

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-13 15:55:48 +00:00
Jiralite
0b7f296b62 chore(guide): Update pages (#9372) 2023-04-13 17:10:06 +02:00
Jiralite
85a379fdf8 feat(guide): How to contribute (#9376) 2023-04-13 14:19:43 +02:00
Jiralite
8ffcf77840 docs: add SnowflakeUtil (#9371) 2023-04-13 14:19:13 +02:00
iCrawl
fcb3a1ab27 fix(guide): update return link on 404 2023-04-12 01:04:36 +02:00
iCrawl
40be4f80dc fix(guide): light mode fix 2023-04-12 00:44:21 +02:00
iCrawl
ee907f32f3 feat(guide): sidebar 2023-04-12 00:39:35 +02:00
iCrawl
731ea5f3cb fix(website?): static params 2023-04-11 20:52:37 +02:00
iCrawl
24c462bf6f refactor(website): dark mode 2023-04-11 20:13:59 +02:00
iCrawl
78e02c4b63 fix(website): navigation and 404 2023-04-11 19:19:33 +02:00
iCrawl
dcf8757d35 ci: correct path again 2023-04-11 18:36:13 +02:00
iCrawl
a0c57abadd ci: uploading to before mv 2023-04-11 18:26:27 +02:00
iCrawl
1c5a6fa552 ci: update glob path 2023-04-11 18:12:56 +02:00
Jiralite
6a221a9676 fix(Property): Check for a property type excerpt (#9365) 2023-04-11 14:12:03 +02:00
DD
dcf58d8140 refactor(WebSocketShard): waitForEvent and its error handling (#9282)
* refactor(WebSocketShard): waitForEvent and its error handling

* chore: remove unnecessary error event

* chore: handle ECONNREFUSED/ECONNRESET

* fix: reset network error check

---------

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-11 11:10:32 +00:00
Jiralite
676307ff5c fix(core): Support attachment editing on interactions (#9356)
fix(core): support attachment editing on interactions

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-10 20:35:54 +00:00
Jiralite
23e0ac56f4 docs(formatters): Enhance the documentation (#9364) 2023-04-10 22:29:06 +02:00
Jiralite
8073561824 docs(builders): Add some basic documentation (#9359) 2023-04-10 22:09:51 +02:00
Jiralite
c0f2dd7131 docs: Use stable tag (#9343)
docs: use stable tag
2023-04-10 14:55:51 +00:00
Almeida
d6905b3b97 fix(website): dont show parameters header on functions without parameters (#9361) 2023-04-10 14:00:32 +02:00
Jiralite
774e23c572 fix(Function): Add link to source file (#9360) 2023-04-10 14:00:03 +02:00
Jiralite
1c8567f147 feat: Support @returns (#9362)
Co-authored-by: Noel <buechler.noel@outlook.com>
2023-04-10 13:59:29 +02:00
Jiralite
733c96c255 feat: Support @defaultValue (#9363) 2023-04-10 13:56:43 +02:00
iCrawl
69cdeb7296 ci: fix docs upload path 2023-04-10 13:23:27 +02:00
iCrawl
0019700869 chore(website): switch to revalidate on fetch level 2023-04-10 12:51:13 +02:00
iCrawl
3ea4d26ee9 fix(scripts): skip over namespaces 2023-04-09 19:32:41 +02:00
iCrawl
250eccf118 fix(website): members only on interfaces and classes 2023-04-09 19:12:42 +02:00
iCrawl
7d3827ebd1 fix(website): pass on revalidate 2023-04-09 18:55:59 +02:00
iCrawl
d1955f7c9e feat(website): static, optional, private, inherits, extends 2023-04-09 18:40:49 +02:00
iCrawl
6412da4921 feat: endpoint to retriveve memeber info 2023-04-09 14:21:45 +02:00
Jiralite
79123fb260 fix(ExcerptText): Use resolveItemURI() in excerpts (#9354)
Co-authored-by: Noel <buechler.noel@outlook.com>
2023-04-09 13:23:05 +02:00
iCrawl
3d2f4b405e chore(guide): bring guide up to speed 2023-04-09 12:41:02 +02:00
Almeida
bfee6c8d88 perf(RoleManager): dont call Role#position getter twice per role (#9352)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-09 10:29:18 +00:00
Jiralite
fbbce3eb4b fix: Correct @link tags that involve parents (#9351) 2023-04-09 11:22:07 +02:00
Jiralite
b2eec5f9fc docs: Remove JSONEncondable (#9344)
docs: remove `JSONEncondable`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-08 21:55:58 +00:00
Jiralite
b618e215f2 fix(util): Remove extra slash (#9347) 2023-04-08 23:51:58 +02:00
Jiralite
d66d113333 docs: Use @link in @see (#9348) 2023-04-08 23:50:58 +02:00
iCrawl
1b9d07f941 chore(website): downgrade planetscale dep 2023-04-07 21:25:15 +02:00
iCrawl
f893c6a357 chore: deps 2023-04-07 21:13:36 +02:00
iCrawl
687bbd889f chore(website): this may solve dynamic route problems
https://github.com/vercel/next.js/pull/47982
2023-04-07 20:54:16 +02:00
iCrawl
f195556b64 fix(website): downgrade nextjs 2023-04-07 20:10:20 +02:00
iCrawl
9aafdd6214 fix(website): model import 2023-04-07 13:41:19 +02:00
Jiralite
e3e7d500dc refactor: Use description constant in landing page (#9334) 2023-04-07 13:12:48 +02:00
iCrawl
3615e2f2d2 chore(website): deps 2023-04-07 13:10:01 +02:00
Tetie
a7425c29c4 fix: fix external links (#9313)
* fix: fix external links

* fix: fix external links

* fix: link to correct classes

* fix: fix JSONEncodable link

* chore: fix select menu link

* fix: fix external links

* fix: link to correct classes

* fix: fix JSONEncodable link

* chore: fix select menu link

* fix: fix collection#sweep url

* fix: fix subpackages urls

* fix: fix discord.js docs url

* Update packages/util/docs/README.md

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

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-04-07 10:35:56 +00:00
Suneet Tipirneni
c519fe66c9 refactor(ui): add 'use client' directives to client-only components (#9330) 2023-04-07 09:22:40 +02:00
Almeida
24f280290b fix(website): dont crash when serviceWorker is not available (#9331) 2023-04-07 09:22:09 +02:00
Almeida
6912faa9b3 fix(core): missed optional options (#9311)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-04 18:37:26 +00:00
iCrawl
0645bf0f7f fix(website): edge-config fallback 2023-04-02 18:30:00 +02:00
iCrawl
6aba9e99eb ci: planetscale upload 2023-04-02 13:22:52 +02:00
iCrawl
5efdf57894 chore: deps 2023-04-02 12:59:19 +02:00
iCrawl
74059c9d97 chore(builders): release @discordjs/builders@1.6.1 2023-04-02 12:38:29 +02:00
iCrawl
8d345a041e chore: add next to packages 2023-04-02 02:50:27 +02:00
iCrawl
1cbd04e8fd build: git-cliff config 2023-04-02 01:55:39 +02:00
iCrawl
8592edba39 chore(discord.js): release discord.js@14.9.0 2023-04-02 01:52:41 +02:00
iCrawl
38f0986000 chore(ws): release @discordjs/ws@0.8.0 2023-04-02 01:51:56 +02:00
iCrawl
9e077b749c chore(voice): release @discordjs/voice@0.16.0 2023-04-02 01:51:50 +02:00
iCrawl
b977ba5f4d chore(rest): release @discordjs/rest@1.7.0 2023-04-02 01:51:33 +02:00
iCrawl
1a6db13f6f chore(proxy): release @discordjs/proxy@1.4.0 2023-04-02 01:51:26 +02:00
iCrawl
3334739f4f chore(formatters): release @discordjs/formatters@0.3.0 2023-04-02 01:51:17 +02:00
iCrawl
26b2f59bdc chore(core): release @discordjs/core@0.5.0 2023-04-02 01:51:07 +02:00
iCrawl
b0ecc57977 chore(collection): release @discordjs/collection@1.5.0 2023-04-02 01:50:51 +02:00
iCrawl
035203f0d9 chore(builders): release @discordjs/builders@1.6.0 2023-04-02 01:49:33 +02:00
iCrawl
ce7d6b47b7 chore(brokers): release @discordjs/brokers@0.2.0 2023-04-02 01:49:13 +02:00
Noel
11e682cfe3 feat(core): http-only wrapper (#9281) 2023-04-02 01:44:19 +02:00
Vlad Frangu
9d69bba47c fix(core): include data for defer (#9284) 2023-04-02 01:38:33 +02:00
Jaw0r3k
2792e48119 docs: describe private properties (#8879)
* feat: describe private properties

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

Co-authored-by: MrMythicalYT <91077061+MrMythicalYT@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: MrMythicalYT <91077061+MrMythicalYT@users.noreply.github.com>

* Apply suggestions from code review

---------

Co-authored-by: MrMythicalYT <91077061+MrMythicalYT@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-01 23:21:53 +00:00
Jaw0r3k
384b4d10e8 docs: differ User#send (#9251)
* docs: differate user#send

* chore: format

* chore: remove some examples

* docs: add GuildMember#send example

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-01 23:17:54 +00:00
Jaw0r3k
d16114c526 docs: fix compare position example (#9272)
Update Role.js

Co-authored-by: space <spaceeec@yahoo.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-01 22:37:18 +00:00
pkdev08
de1aac674a fix: add support for new guild feature GUILD_WEB_PAGE_VANITY_URL (#9219)
Co-authored-by: space <spaceeec@yahoo.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-01 22:34:07 +00:00
Jaw0r3k
79875658cf fix: resolving string bitfield (#9262)
fix: resolving bitfield

Co-authored-by: space <spaceeec@yahoo.com>
2023-04-01 22:30:51 +00:00
Jiralite
ab3328a0e2 chore: Include discord.js in the user agent string (#9267)
* chore: apply user agent string

* fix: enforce even in custom option

* fix: tests

* refactor: simpler way

* docs: add type

* Update packages/discord.js/src/client/BaseClient.js

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

* fix: prioritise `option` type check

* types: `static`

* feat: add runtime check

* docs: update default

* refactor: remove Bun

* Update packages/discord.js/src/client/BaseClient.js

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

* fix: extra whitespace issues

* refactor: `trimEnd()`

---------

Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-01 22:26:44 +00:00
Jiralite
1864d37d36 fix(AutocompleteInteraction): Send name_localizations correctly (#9238)
fix(AutocompleteInteraction): send locale correctly

Co-authored-by: space <spaceeec@yahoo.com>
2023-04-01 22:19:23 +00:00
Tetie
f340f3b1fd refactor: call GuildBanManager#create() directly (#9263)
refactor: call bans.create directly

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-01 22:09:01 +00:00
Suneet Tipirneni
907eb1b470 feat(core): Add AbortSignal support. (#9042)
* feat: add abort signal to guilds api

* feat: add to application commands, channels, and users classes

* chore: finish up

* chore: centralize types

* chore: make requested changes

* chore: make requested changes

* refactor: consistently use empty objects

* Update packages/core/src/api/webhook.ts

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

* chore: make requested changes

* refactor: update `setVoiceState` after rebase

* chore: requested changes

* refactor: use -types interface for query

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-04-01 21:11:37 +00:00
iCrawl
e2f39ccc32 fix(website): migration from old website 2023-04-01 15:50:47 +02:00
Tetie
74a6d59ae9 chore: overhaul readmes (#9277)
Co-authored-by: Souji <timoqueezle@gmail.com>
Co-authored-by: Noel <buechler.noel@outlook.com>
2023-04-01 13:45:15 +02:00
iCrawl
a5b0d97224 fix(website): redirect for logo 2023-04-01 13:32:10 +02:00
iCrawl
52c6ea2fdb feat(website): add static logo 2023-04-01 13:15:27 +02:00
iCrawl
cfa48cedc3 fix(website): update url 2023-04-01 13:12:18 +02:00
iCrawl
cf23149d17 fix(website): make sure to use proper revalidate and per request caching 2023-04-01 03:12:12 +02:00
iCrawl
311cab2d3f build(website): build site from db data 2023-04-01 02:50:24 +02:00
Jiralite
34bc36ac4b feat(Guild): Add max_stage_video_channel_users (#8422)
feat(Guild): add `max_stage_video_channel_users`
2023-03-31 22:30:25 +00:00
ckohen
db8df104c5 fix(handlers): create burst handler for interaction callbacks (#8996)
* fix(handlers): create burst handler for interaction callbacks

* docs: use remarks instead of info block

Co-Authored-By: Almeida <almeidx@pm.me>

* refactor: move code duplication to shared handler

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

* Update packages/rest/src/lib/handlers/BurstHandler.ts

---------

Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Aura Román <kyradiscord@gmail.com>
2023-03-30 17:22:04 +00:00
Jiralite
984bd55b43 fix: Keep symbols in actions manager (#9293)
fix: keep symbols in actions manager
2023-03-29 17:27:23 +00:00
iCrawl
3cf4f4b317 ci: fix linting astro files 2023-03-28 23:10:41 +02:00
iCrawl
fd008f0144 ci: run specific version of node 2023-03-28 23:02:25 +02:00
iCrawl
8deef3e93f ci: fix docker image build 2023-03-28 22:55:28 +02:00
iCrawl
89235f32b0 ci: docker image build for proxy 2023-03-28 22:47:48 +02:00
Noel
47da24ff5c refactor(website): redesign (#9286) 2023-03-28 19:02:36 +02:00
iCrawl
d1ebe4a52c fix(website): right sidebar height 2023-03-27 20:50:35 +02:00
iCrawl
5cdd5d76ed fix(website): page height to hide footer without scrolling 2023-03-27 20:43:34 +02:00
iCrawl
b8b852ee1e feat(guide): light theme for syntax 2023-03-25 23:46:42 +01:00
iCrawl
ba93bc8141 chore: fixup root package.json 2023-03-25 22:55:53 +01:00
iCrawl
fbd599d586 refactor(guide): next 13 2023-03-25 22:52:47 +01:00
iCrawl
d9a9500b40 feat(website): optimize svg and priority load svg 2023-03-25 18:56:57 +01:00
iCrawl
51de9668e5 feat(website): feature flag package and version selection 2023-03-25 16:33:13 +01:00
iCrawl
b097b25116 fix(website): package / version select spacing 2023-03-25 14:55:15 +01:00
iCrawl
1d2c152320 fix(website): keys 2023-03-25 14:42:53 +01:00
iCrawl
d8d5f31d39 fix(scripts): accessing tsComment 2023-03-25 14:02:40 +01:00
Jiralite
abd6ae9fc8 fix(ClientUser): No mutation on edit (#9259)
fix(ClientUser): no mutation on edit

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-25 12:59:22 +00:00
iCrawl
44ef2d9485 fix(website): wrong bg color for buttons in pkg/version select 2023-03-25 13:52:51 +01:00
DD
519825a651 fix(WebSocketShard): don't await #destroy in error bubbling logic (#9276)
* fix(WebSocketShard): don't await #destroy in error bubbling logic

* fix: properly throw abort errors

* chore: vlad's nit

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-25 12:49:35 +00:00
iCrawl
ad31edc7aa refactor(website): font loading and reduce cls 2023-03-25 13:44:35 +01:00
Almeida
d6f4e60efd refactor(collection): fix/silence linter warnings (#9266)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-25 09:32:52 +00:00
iCrawl
5fcd0e48a8 fix(website): nav / member provider 2023-03-24 06:24:47 +01:00
iCrawl
52f8e0670c feat(website): color scheme / dark and light mode improvements 2023-03-24 06:02:00 +01:00
iCrawl
1c4af93898 feat(website): enhance lazy loading 2023-03-24 04:27:21 +01:00
iCrawl
3bd76078e1 feat(website): sneaky sneaky 2 2023-03-24 01:54:21 +01:00
iCrawl
71eba0e1b2 chore(website): sneaky sneaky 2023-03-24 00:30:14 +01:00
iCrawl
d284b8c64b chore: fix lockfile 2023-03-23 23:49:06 +01:00
iCrawl
795e6c363d fix(website): footer spacing 2023-03-23 23:46:37 +01:00
iCrawl
d6cd3fd7ed chore: deps 2023-03-23 23:24:27 +01:00
iCrawl
d144a78813 ci: add lighthouse for prod 2023-03-23 23:11:13 +01:00
iCrawl
645e2d3d6b ci: lighthouse score 2023-03-23 22:48:27 +01:00
iCrawl
5b745a49d8 chore(website): fix metadata 2023-03-23 22:37:50 +01:00
Suneet Tipirneni
ee5169e0aa feat(website): render syntax and mdx on the server (#9086) 2023-03-23 22:17:41 +01:00
Jiralite
bc641fa936 docs(Role): Fix example for comparePositionTo() (#9270)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-23 20:50:58 +00:00
Suneet Tipirneni
c8c02f957d fix(website): remove layout shift (#9062)
Co-authored-by: Noel <buechler.noel@outlook.com>
2023-03-23 20:44:04 +01:00
Suneet Tipirneni
091824abc5 fix(website): show headers for type aliases (#9054) 2023-03-23 20:42:29 +01:00
Suneet Tipirneni
03f5f1e3b6 refactor(website): use new metadata api instead of head.tsx (#9269) 2023-03-23 20:41:29 +01:00
iCrawl
852fae557e chore: deps 2023-03-23 14:28:58 +01:00
Rodry
5f93dcce46 feat: add GuildBasedTextChannelTypes (#9234)
* feat: add GuildBasedTextChannelTypes

* docs(GuildTextBasedChannels): distinguish from non other

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

* fix: spread correct array

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

---------

Co-authored-by: Jaw0r3k <jaworekwiadomosci@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2023-03-22 22:03:44 +00:00
Erwan
22e880aaa0 fix(Message#editable): update editable check in threads locked (#9216)
* fix(Message#editable): update editable check in threads locked

* fix(Message#editable): add check in archived threads

* fix: check manage threads permission only if thread is locked

* fix: adding a full stop at the end of a sentence

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

---------

Co-authored-by: Jaworek <jaworekwiadomosci@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2023-03-22 21:38:32 +00:00
Jiralite
e9a8eb323f fix(ThreadManager): add members and conditionally include hasMore (#9164)
* fix(ThreadManager): conditionally include `hasMore`

* types: fix tests

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-22 19:24:09 +00:00
Jiralite
cc57563e73 fix(ThreadManager): Respect cache and force in fetching (#9239)
* fix(ThreadManager): Respect `cache` and `force` in fetching

* refactor: remove defaults

These are already defaulted down the line.

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-22 19:20:52 +00:00
Jiralite
519e163f8a refactor(FetchThreadsOptions): Remove active (#9241)
* refactor(FetchThreadsOptions): remove `active`

* docs(FetchThreadsOptions): update description

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-22 19:17:47 +00:00
DD
eb81dc982c chore(ws): correct order for debug logs when identifying (#9248)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-22 19:13:56 +00:00
Tetie
bf507ab265 docs: add more examples (#9252)
* docs: add more examples

* fix: fix grammar and syntax

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

* chore: fine-tune examples

* chore: replace double quotes with singles

* fix: remove redundant example tag

* fix: fix timeout logging

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

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

---------

Co-authored-by: Jaw0r3k <jaworekwiadomosci@gmail.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-03-22 19:09:41 +00:00
Jiralite
178c8dcfee docs(FetchArchivedThreadOptions): before respects archive_timestamp, not creation timestamp (#9240)
docs(FetchArchivedThreadOptions): correct `before` description

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-22 19:01:17 +00:00
Jiralite
56cf138e02 docs: Update APISelectMenuComponent (#9235)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-22 18:57:23 +00:00
Jiralite
950fc47234 ci: Lock ancient issues (#9257)
ci: use dessant/lock-threads@v4
2023-03-20 19:35:58 +00:00
DD
c76b17d3b3 fix(WebSocketShard): don't close in #destroy when status is connecting (#9254) 2023-03-20 19:20:48 +00:00
Jeroen Claassens
229ad077ff fix(rest): remove const enums in favour of regular enums (#9243)
* fix(rest): remove `const enum`s in favour of regular enums

The motivation is that `const enum` produces ambient const enums when
compiling which in turn causes issues with TypeScript 5.x when `verbatimModuleSyntax`
is enabled.

Furthermore, the generally accepted best practice is to avoid `const enum`s
when writing libraries. Can back this up with statements from TS maintainers
if needed, I know they made them, I just can't be bothered to find the GitHub
links lmao. @vladfrangu will probably be able to find those links much easier
than me as it was also the motivation to remove `const enum`'s from discord-api-types

* refactor(rest): restore `const enum` for internal enum

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-19 14:35:27 +00:00
Jeroen Claassens
2e8e95031c build: resolve issue with esbuild-plugin-version-injector not working (#9246)
The issue was two-fold.
First of all, tsup starts using swc when `emitDecoratorMetadata` and `@swc/core` is installed.
`@swc/core` is installed transiently, which still causes the problem.
Okay, sure, so we move the `emitDecoratorMetadata` option to just
`packages/builders/tsconfig.json` seeing as the other packages don't use decorators anyway.
But that still leaves solving the issue for builders. @vladfrangu ended
up finding out that there was a bug in how esbuild handles plugins causing
the esbuild-plugin-version-injector plugin to not get loaded. This is solved
in v1.1.0 where the content is also replaced using the `onEnd` hook, if it
wasn't replaced by `onLoad` yet.
2023-03-19 14:28:06 +00:00
DD
98420826bc fix(WebSocketShard): cancel initial heartbeat in destroy (#9244)
* fix(WebSocketShard): cancel initial heartbeat in destroy

* refactor: use try/catch/finally

* chore: add debug log
2023-03-18 19:32:50 +00:00
n1ck_pro
51edba78bc fix(TextBasedChannelTypes): add GuildStageVoice (#9232)
fix(TextBasedChannelTypes): add GuildStageVoice
2023-03-15 17:32:29 +00:00
Jiralite
41077c96b5 chore: release all packages (#9230)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2023-03-12 20:54:27 +00:00
Almeida
869153c3fd refactor: compare with undefined directly (#9191)
* refactor: compare with `undefined` directly

* fix: lint
2023-03-12 20:24:22 +00:00
DraftMan
955e8fe312 fix(snowflake): snowflakes length (#9144)
* fix(snowflake): fix snowflakes length

* fix(snowflake): fix length
2023-03-12 20:07:51 +00:00
Rodry
4458a13925 feat(Collector): add lastCollectedTimestamp (#9044)
* feat(Collector): add lastCollectedTimestamp

* docs: mark props as nullable

Co-authored-by: Synbulat Biishev <syjalo.dev@gmail.com>

* refactor: assign property in constructor

---------

Co-authored-by: Synbulat Biishev <syjalo.dev@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2023-03-12 19:59:09 +00:00
Jiralite
334a51240a fix: modify tsup extension (#9157)
fix: modify extension

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-12 19:49:43 +00:00
Suneet Tipirneni
dff131e8e4 refactor(core): move setVoiceState to GuildsAPI (#9228)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-12 19:37:56 +00:00
André Paulo
f5ec1cada5 docs(MessageManager): add clarification to fetch messages (#9222)
* docs(MessageManager): add clarification to fetch messages

[Discord's documentation](https://discord.com/developers/docs/resources/channel#get-channel-messages) mentions that you can only use before, after or around. This is not mentioned in D.JS documentation, and after some time trying to figure out why I was getting more messages than I should, decided to read the documentation.

* docs(MessageManager): remove mutually exclusive description

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-12 19:34:48 +00:00
DD
a99fc64e3f fix(WebSocketShard): #send race condition due to ready state (#9226)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-12 19:28:10 +00:00
DD
6ecff26ec6 feat(WebSocketShard): heartbeat jitter (#9223)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-12 19:24:35 +00:00
Jiralite
646b6ead7e chore(voice): release @discordjs/voice@0.15.0 (#9229)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2023-03-12 19:13:09 +00:00
Almeida
3492b194b5 types(MappedEvents): add GuildAuditLogEntryCreate (#9175)
* types(MappedEvents): add `GuildAuditLogEntryCreate`

* chore: sort interface alphabetically

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-12 18:15:54 +00:00
Suneet Tipirneni
1b29099ed0 fix(core): use auth: false for interaction callback methods (#9211)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-09 11:15:32 +00:00
Vlad Frangu
c6d98fa0c5 fix(Voice): send keep alives without awaiting a response (#9202) 2023-03-09 12:12:02 +01:00
Almeida
f65ac2ea78 docs: fix /core README example (#9201) 2023-03-09 12:09:44 +01:00
Vlad Frangu
a63ac88fcc fix(Actions): inject built data by using a symbol (#9203)
This fixes the hard crash encountered from message component interactions
where a `channel` property was added to them, causing hard crashes

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-09 11:05:52 +00:00
Synbulat Biishev
4367ab9302 docs(EmbedBuilder#spliceFields): fix a typo (#9159)
fix(EmbedBuilder#spliceFields): fix a typo

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-05 22:42:35 +00:00
iCrawl
dc142c47e4 chore: regen yarn lock 2023-02-27 21:58:49 +01:00
iCrawl
1f86d8578a chore: deps 2023-02-27 21:55:46 +01:00
Synbulat Biishev
71a427f632 types: allow sending messages with SuppressNotifications flag (#9177) 2023-02-27 21:39:03 +01:00
Jaworek
664cccb270 docs: make interactionResponse as optional (#9179) 2023-02-27 21:38:03 +01:00
DD
27e0b32c5f fix(WebSocketShard): wait for hello rather than ready in connect (#9178) 2023-02-27 19:37:16 +00:00
Jaworek
ffdb197f98 feat(StageChannel): add messages (#9134)
* feat(StageChannel): add messages

* fix: missing implements jsdoc

* Apply suggestions from code review

Co-authored-by: MateoDeveloper <79017590+Mateo-tem@users.noreply.github.com>

* Update packages/discord.js/src/util/Constants.js

Co-authored-by: MateoDeveloper <79017590+Mateo-tem@users.noreply.github.com>

* feat: use common class

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* feat: add stage to text based channels + fix webhook.channel typings

* fix: some fixes

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

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

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

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

* Update packages/discord.js/src/structures/interfaces/TextBasedChannel.js

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

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

Co-authored-by: space <spaceeec@yahoo.com>

---------

Co-authored-by: MateoDeveloper <79017590+Mateo-tem@users.noreply.github.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: space <spaceeec@yahoo.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-25 15:03:18 +00:00
Jaworek
095bd77515 feat(AutoModerationActionExecution): add channel, user and member getters (#9142)
* feat(AutoModerationActionExecution): add channel prop

* feat(AutoModerationActionExecution): add user prop

* fix: sintax

* feat: add guildmember getter

* Apply suggestions from code review

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

---------

Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-25 14:41:10 +00:00
Synbulat Biishev
e78b8ad3fb fix(Message#deletable): add check for deletable message types (#9168)
* fix(Message#deletable): add check for deletable message types

* docs: update docs

* fix: add check for `AutoModerationAction` message

* style: better style

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-25 14:38:05 +00:00
Jiralite
c1000b86ed feat(AutoModeration): Support custom_message (#9171)
* feat: initial commit

* docs: fix type

* docs: this is probably a better explanation

* docs: optional

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-25 14:34:48 +00:00
Sugden
a9495bd8f0 fix(Message): bulkDeletable permissions should be retrieved later for DMs (#9146)
* fix(Message): permissions check should be done later

the getter will error if used on a message originating from a DM

* refactor: remove unessercary chaining
2023-02-25 14:21:53 +00:00
Jiralite
4e0e125039 refactor(GuildMemberManager): Tidy up fetching guild members (#8972)
* refactor(GuildMemberManager): tidy up fetching guild members

* refactor: no destructure

* fix: throw `nonce` error correctly

* refactor: simplify `resolve()` with ternary

* refactor: prioritise `nonce` check

* fix: allow single user

* refactor: do not use `null`

This is not documented to request over the gateway.

* refactor: better name

* fix: extract correct property
2023-02-21 20:36:25 +00:00
ckohen
6e481f0a30 ci: create publish release workflow (#9150)
* ci: create publish release workflow

* test: fix tests for formatTag

* ci(publish-release): fix string concat

* ci: release action runs with tag as source

* ci(publish-release): no longer testing

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-21 20:15:39 +00:00
Almeida
fd0246ca4c types: remove EscapeMarkdownOptions (#9153) 2023-02-21 20:11:33 +00:00
DD
9681f34877 fix(WebSocketShard): proper error bubbling (#9119)
* fix(WebSocketShard): proper error bubbling

* fix(WebSocketShard): proper success signaling from waitForEvent

* refactor(waitForEvent): better error bubbling behavior

* fix(WebSocketShard): still allow the first connect call to reject

* fix(WebSocketShard): handle potential once error in #send

* refactor(WebSocketShard): waitForEvent & bubbleWaitForEventError

* refactor: success signaling

* chore: bump async EE to allow overwriting the error event
2023-02-19 19:28:34 +00:00
ckohen
7f2ef962ec test: fix coverage reporting (#9148)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-19 18:59:35 +00:00
DD
5c5a5832b9 refactor(WebSocketManager): passing in strategy (#9122)
* refactor(WebSocketManager): passing in strategy

* chore: update tests

* chore: requested nits

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-19 18:57:31 +00:00
Mohamed Ashraf
c6f9c50ba9 feat(core): Adds getWebhooks() function for the channel API and for the guild API (#9043)
* feat(core): Adds `getChannel()` for webhooks

* feat(core): add `getWebhooks()` function for the channel and the guild

* Update packages/core/src/api/guild.ts

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

* Update packages/core/src/api/channel.ts

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

* Update packages/core/src/api/channel.ts

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

* Update packages/core/src/api/guild.ts

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

* Update packages/core/src/api/guild.ts

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

* Update packages/core/src/api/channel.ts

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

* sorting the types

---------

Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: space <spaceeec@yahoo.com>
2023-02-17 23:35:44 +00:00
Jiralite
765d5a3b2d feat(ThreadMemberManager): Support pagination fetching (#9035)
* feat: initial commit

* fix: `query`

* fix: `GuildMember` for `member`

* types(ThreadMember): constructor types

* fix: send API properties correctly

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

* docs(FetchThreadMembersOptions): update `cache` description

* fix: retrieve from option

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

* fix: fix fetch many

* types(FetchThreadMembersOptions): add `withMember`

* types: stricter types

* types: infer possible guild member

* chore: reference member in getter

* types: remove `<false>`

* style: remove line

* chore: markdown

* types: remove `?`

* docs: remove irrelevant part

* fix: prevent crash

* refactor: make `member` `@private`

It will be confusing to have `guildMember` and `member`, specially since the former accounts for the latter.

---------

Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-17 22:14:36 +00:00
MrMythicalYT
dc9924fb5f feat(InteractionResponse): add new methods (#9132)
* feat(InteractionResponse): add new methods

* types: fix options parameter type

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

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

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

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

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

* docs: add description for edit

---------

Co-authored-by: Jaworek <jaworekwiadomosci@gmail.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-02-17 21:56:18 +00:00
net-tech
da23cd5d69 typings(Attachment): make attachment private (#8982)
* typings(Attachment): remove attachment property

* remove from structures

* Revert "remove from structures"

This reverts commit 88acb8d276.

* typings(attachment): make attachment private

---------

Co-authored-by: space <spaceeec@yahoo.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-17 21:52:51 +00:00
Almeida
76b21162ac feat(GuildMember): add flags (#9087)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-17 21:09:49 +00:00
SKINMAKER
4e0a89f58f types: fix type of Attachment#name (#9101)
Co-authored-by: space <spaceeec@yahoo.com>
2023-02-17 20:33:08 +00:00
Almeida
483cbb3b2a fix(oauth2): pass through body (#9106)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-17 20:18:13 +00:00
Jiralite
9156a2889c fix(AutoModerationActionExecution): transform action (#9111)
* fix: transform action upon execution

* chore: move method into transformer

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-17 20:14:51 +00:00
Almeida
9439107a1d feat(Client): guildAuditLogEntryCreate event (#9058)
* feat(Client): `guildAuditLogEntryCreate` event

* feat: add `targetId` and `executorId`

* types: `ApplicationCommand` fix

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-17 20:11:52 +00:00
Lioness100
1ba1f238f0 docs: fix typos (#9127)
* docs: fix typos

* indicies -> indices

* rename file

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-17 20:07:38 +00:00
Almeida
6f78e8285b docs(chatInputApplicationCommandMention): parameters are not nullable (#9091)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-17 19:54:13 +00:00
Almeida
f268e1d979 fix(MessageReaction): toJSON() infinite recursion (#9070)
* fix(MessageReaction): `toJSON()` infinite recursion

* fix: return type

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

---------

Co-authored-by: Jaworek <jaworekwiadomosci@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-17 19:51:08 +00:00
Jiralite
1ba22f4c9e feat: Add role subscription data (#9025)
* feat: add role subscription data

* docs: specify message type

* types: use interface

* docs: add word

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-17 19:47:08 +00:00
Jiralite
0b76ab4c40 fix(ThreadChannel): insert starter message from threads created in forum channels (#9100)
fix(ThreadChannel): insert starter message from forums

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-17 19:43:21 +00:00
Almeida
f70df910ed refactor(BitField): reverse iterator/toArray responsibilities (#9118)
refactor(BitField): reverse iterator/toArray responsabilities
2023-02-17 19:40:10 +00:00
SkanePrime
b8684e0585 chore: fix \n breaks (#9116) 2023-02-17 20:36:40 +01:00
Aura Román
071516c352 fix(ApplicationRoleConnectionMetadata): export the class correctly (#9076) 2023-02-17 20:34:08 +01:00
Jiralite
d44a6f035c chore: bump discord-api-types and undici (#9140)
* chore: update discord-api-types to 0.37.35

* fix: exclude stage channels for now

* chore: update undici

* chore: dedupe undici
2023-02-17 19:17:08 +00:00
Jiralite
0e4224be36 ci: don't run issue triage on edit (#9113) 2023-02-08 22:00:26 +00:00
Jiralite
405f9400e8 docs: no @type description and reveal info block (#9097) 2023-02-04 13:05:09 +00:00
Synbulat Biishev
8b70f497a1 docs: fix version export (#9049)
* docs: fix version export

* types: assert `[VI]{{inject}}[/VI]` as string

* types: typo

* Revert "types: typo"

This reverts commit ba983f02be.

* types: typo

I hate my local repo. It can't install deps with `--immutable` and a have weird error on `yarn test`, but the CI passes
2023-01-19 15:56:57 +00:00
Suneet Tipirneni
56ef3ad8a0 ci: update scripts for documentation changes (#9055)
* ci: update scripts for documentation changes

* refactor: use tsconfig files

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-17 19:15:01 +00:00
Jiralite
2e48faf91a ci: Update issue labeller (#9064)
* ci: Add formatters issue label

* fix: "the" instead of "this"

* chore: add next
2023-01-17 18:54:56 +00:00
Cl00e9ment
13ce78af6e refactor: Moved the escapeX functions from discord.js to @discord.js/formatters (#8957)
* refactor: moved escapeX funcs from discord.js to @discord.js/formatters

- moved escapeX functions from discord.js to @discord.js/formatters
- converted code from JS to TS (including JSDoc and TSDoc)
- made linter happy
- modified the escapeHeading's RegExp to pass the RegExp safety test
- escapeBulletedList now conserves the bullet style (- or *)

* fix: removed useless exports and eslint command

removed useless exports and eslint command

* fix(escapeX): emojis with underlines

porting the fix made in 2c4c5c23d6 into the refactorization PR

Co-authored-by: space <spaceeec@yahoo.com>
2023-01-13 16:21:25 +00:00
widepeepoclap
b803a9a899 fix: don't auth for interaction showModal() (#9046)
Co-authored-by: space <spaceeec@yahoo.com>
2023-01-13 16:07:06 +00:00
Almeida
6a9875da05 feat(Sticker): add support for gif stickers (#9038)
* feat(Sticker): add support for gif stickers

* chore: upgrade discord-api-types

* refactor: requested changes
2023-01-13 15:29:35 +00:00
Parbez
8c265b628d ci: automated issue labeler (#8873)
* ci: automated issue labeler

* ci: remove comment

* Apply suggestions from code review

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

* ci: update labeler on new package

* chore: add core

* ci: add feature req too

* fix: update date

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-01-13 10:28:14 +00:00
Superchupu
1831acaffb chore: switch tsup config to typescript (#9057)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-13 09:44:56 +00:00
DD
05a1cbfe54 fix: ws typo (#9056)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-13 00:56:43 +00:00
Jiralite
1c871b5b57 refactor: Use deprecate() directly (#9026)
* refactor: just call `deprecate()`

* docs: prevent crash

* refactor: back to prototype deprecation
2023-01-12 20:38:31 +00:00
iCrawl
bb58395df0 chore: update yarn 2023-01-12 14:06:07 +01:00
Suneet Tipirneni
f6506e99c4 feat(website): add support for source file links (#9048)
Co-authored-by: Noel <buechler.noel@outlook.com>
2023-01-12 13:49:11 +01:00
iCrawl
a580768cda ci: remove unnecessary build step 2023-01-12 12:18:32 +01:00
Almeida
cb43db2180 fix(website): scroll to method when clicking anchor (#9047) 2023-01-12 12:17:12 +01:00
iCrawl
368b8ba73c ci: always upload bundle on main 2023-01-12 12:01:42 +01:00
iCrawl
d28af8eca7 ci: use pull request target for forks 2023-01-12 11:46:38 +01:00
iCrawl
4224d783bc ci: fix accessing the base branch bundle 2023-01-12 11:32:09 +01:00
iCrawl
3659e0de67 fix(website): checking if member is accessible 2023-01-12 11:28:13 +01:00
iCrawl
38e115b908 ci: make sure to run build command top-level 2023-01-12 11:15:23 +01:00
iCrawl
4cedc21dbb ci: build packages before building docs 2023-01-12 11:06:24 +01:00
iCrawl
8d327aa416 ci: make sure to build legacy docgen 2023-01-12 11:01:00 +01:00
iCrawl
0a0c7d32d6 ci: update read path for comment 2023-01-12 10:54:13 +01:00
iCrawl
a4f2f1b5a5 chore: deps 2023-01-12 10:36:48 +01:00
ckohen
859111f864 chore: init @discordjs/next (#8988)
Co-authored-by: Superchupu <53496941+SuperchupuDev@users.noreply.github.com>
Co-authored-by: Noel <buechler.noel@outlook.com>
Co-authored-by: Isidro Casiano <isidroICP@outlook.com>
2023-01-12 10:27:07 +01:00
iCrawl
4accb00b98 ci: only run documentation workflow if source files changes 2023-01-12 10:18:53 +01:00
iCrawl
41132b1049 fix(guide): astro config 2023-01-12 10:13:40 +01:00
iCrawl
e042492486 ci: fix nextjs bundle analysis 2023-01-12 09:44:07 +01:00
Almeida
2798ba1eb3 style: run prettier (#9041) 2023-01-12 09:23:02 +01:00
iCrawl
8dfd0037b5 chore: deps 2023-01-10 18:32:57 +01:00
DD
828a13b526 feat(ws): custom workers (#9004)
* feat(ws): custom workers

* chore: typo

* refactor(WebSocketShard): expose shard id

* chore: remove outdated readme comment

* chore: nits

* chore: remove unnecessary mutation

* feat: fancier resolution

* chore: remove unnecessary exports

* chore: apply suggestions

* refactor: use range errors

Co-authored-by: Aura Román <kyradiscord@gmail.com>
2023-01-10 17:31:56 +00:00
Suneet Tipirneni
39c4de2dbc refactor(website): extract layouts and use more server components (#9027)
Closes https://github.com/discordjs/discord.js/issues/8920
Closes https://github.com/discordjs/discord.js/issues/8997
2023-01-10 18:25:14 +01:00
Suneet Tipirneni
158db474b7 types: fix GuildsAPI#getMembers return type (#9037)
* types: fix GuildsAPI#getMembers return type

* chore: make requested changes
2023-01-10 16:03:54 +00:00
iCrawl
a995cbc0fa ci: build website correctly 2023-01-10 13:59:18 +01:00
iCrawl
7ab62b4bb7 ci: add nextjs bundle checker 2023-01-10 13:52:11 +01:00
Almeida
7dad50ee9a revert: fix(DMChannel): recipientId edge case (#9013)
Revert "fix(DMChannel): recipientId edge case (discordjs#8950)"

This reverts commit 7ce9909.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-10 09:59:49 +00:00
Jiralite
f3fe3ced62 docs(ThreadEditOptions): Move info tag back to invitable (#9020)
docs(ThreadEditOptions): move info tag to correct property
2023-01-10 09:53:38 +00:00
DD
ecb4281d1e fix(RequestManager): inference of image/apng (#9014)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-06 15:23:11 +00:00
DD
0ff67d8e7a feat(ws): metrics (#9005)
* feat(WebSocketManager): fetch status

* feat(WebSocketShard): heartbeat event

* chore: ci

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-06 12:00:47 +00:00
DD
e8b7504352 chore: remove proxy dep hack (#9006)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-06 11:56:59 +00:00
Jiralite
0076589ccc feat(GuildAuditLogs): Support after (#9011)
* feat(GuildAuditLogs): support `after`

* refactor: remove variables

They were only being used once each.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-06 11:46:20 +00:00
Suneet Tipirneni
816aed478e feat(core): implement some ws send events (#8941)
* feat(core): implement some ws send events

* fix: check guild id and add a timeout

* fix: only check for nonce

* chore: update readme

* chore: make requested changes

* chore: make methods consistent

* chore: fix readme example

* chore: move shard ID calculation to util

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-05 22:06:50 +00:00
Almeida
3407e1eea3 feat: add role subscriptions (#8915)
* feat: add role subscriptions

* docs: casing

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

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-01-04 00:39:31 +00:00
Jiralite
7dec892218 types: Allow builders to set channel types in discord.js (#8990)
types: allow builders to set channel types

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-02 15:24:10 +00:00
iLxlo_
6d7a143667 docs: Fix a typo in the MentionableSelectMenuInteraction link (#9000) 2023-01-02 16:18:07 +01:00
Jiralite
be294eaf99 feat: Add not_found to guild member chunk data (#8975)
* feat: add `not_found` to chunk data

* docs: consistency

* types: export `JSONValue`

* refactor: move into typedef area

* refactor: prefer unknown

* docs: fix parsing

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-02 11:55:06 +00:00
Voxelli
876b181312 fix(WebSocketShard): Zombie connection fix (#8989)
* fix: zombie connection
- Fix backport #7626 missing changes
- Reverted the pull request #8956
- Removed unref of wsCloseTimeout
- We are resuming the connection for zombie instead of starting a new

Co-authored-by: DraftMan <nicovanaarsen@gmail.com>

* refactor: ♻️ Format code and remove useless assignation

Co-authored-by: DraftMan <nicovanaarsen@gmail.com>
2023-01-01 17:49:20 +00:00
Jiralite
d3e9f2a355 refactor(Guild): Destructure object in guild editing (#8971)
* refactor: simplify guild editing

* chore: remove strange rule modification

* refactor: destructure more!

* refactor: remove pattern, allow `0` bit

* refactor: spread

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-31 00:37:18 +00:00
Jiralite
ad49845260 types: Swap message reaction and emoji identifier types (#8969)
* types: swap message reaction and identifier types

* docs: reflect changes

* types: simplification

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

Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-31 00:33:01 +00:00
Jiralite
d7a09f6fce refactor(GuildManager): Better handling of creation code (#8974)
* refactor(GuildManager): tidy up guild creation

* refactor: emit once only

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

* fix: allow `0`/`0n`

* refactor: modify name

Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-31 00:29:56 +00:00
Jiralite
2e22b31892 docs(ApplicationRoleConnectionMetadata): Add documentation (#8976)
docs: show `ApplicationRoleConnectionMetadata`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-31 00:26:29 +00:00
Almeida
f89a164bac fix(website): package selector page height on small devices (#8953)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-31 00:23:08 +00:00
Cl00e9ment
4ee00b6534 docs: updated @discordjs/ws README.md to include optional packages (#8973)
* docs: updated ws's readme to include optional packages

- added optional packages to the README.md
- added an example on how to add a listener to the ws manager, in the README.md

* docs: changed "addEventListener" to "on" in ws's readme

changed "addEventListener" to "on" in @discord.js/ws README.md

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-31 00:20:36 +00:00
Jaworek
d8dd197a93 fix: keep other properties in triggerMetadata (#8977)
fix: keep other properties

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-31 00:17:20 +00:00
Ben
898b5ac416 typings(widget): add missing name (#8978)
typings(widget): add missing name
2022-12-31 00:12:27 +00:00
Suneet Tipirneni
3160ab0fc7 chore: use generator for range utility (#8825)
* chore: use generator for range utility

* chore: update doc examples

* chore: fix spelling

* chore: fix typo

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-25 20:43:58 +00:00
Almeida
a6941d536c feat(StringSelectMenu): add spliceOptions() (#8937)
* feat(StringSelectMenu): add `spliceOptions()`

* fix: requested changes

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-25 20:38:28 +00:00
MrMythicalYT
bec51de103 types: use StringSelectMenuOptionBuilder (#8949)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-25 20:35:09 +00:00
MrMythicalYT
5915f39810 types: fix actions type in automod (#8962)
* types(AutoModerationRuleCreateOptions): fix actions type

* types: update setActions

* docs: use array type for actions

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-25 20:31:59 +00:00
Suneet Tipirneni
5dc5e90268 types: subcommand group options is required (#8966)
types: sub-command group options is required

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-25 20:27:44 +00:00
Almeida
07b597df16 fix(escapeX): emojis with underlines (#8945)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-25 20:04:26 +00:00
Suneet Tipirneni
36560c9955 feat(core): add oauth2 api support (#8938)
* feat(core): add oauth2 api support

* chore: remove return tag

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-25 19:53:56 +00:00
Qjuh
43ce2a572e fix(WebSocketShard): either start close timeout or emit destroyed but never both (#8956)
* fix(WebSocketShard): only close timeout or destroy

* Remove optional chaining

Co-authored-by: Voxelli <69213593+legendhimself@users.noreply.github.com>

Co-authored-by: Voxelli <69213593+legendhimself@users.noreply.github.com>
2022-12-25 19:05:19 +00:00
Almeida
22e2bbb0d2 feat(ClientApplication): add role connections (#8855)
* feat(ClientApplication): add role connections

* fix: constructor and edit types

* fix: rename typedef

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-24 08:00:39 +00:00
Almeida
7ce990954e fix(DMChannel): recipientId edge case (#8950)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-24 07:42:53 +00:00
Jiralite
0b8b114761 docs: Fix malformed overridden documentation (#8954)
* docs: override `resolve()` & `resolveId()`

* docs(CategoryChannel): move `setParent()` up

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-24 07:35:32 +00:00
MrMythicalYT
6614603326 fix: return only boolean for disabled (#8965)
* fix: return only boolean for `disabled`

* fix: return only boolean for `disabled`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-24 07:29:32 +00:00
Synbulat Biishev
153352ad7a types: add generic to ActionRowBuilder.from() (#8414)
* types: add generic to `ActionRowBuilder#from()`

* test: add tests for `ActionRowBuilder.from()`

* tests: add more tests
2022-12-23 19:57:20 +00:00
Almeida
429dbccc85 feat(CommandInteractionOptionResolver): add channelTypes option to getChannel (#8934)
* feat(CommandInteractionOptionResolver): add `channelTypes` option to `getChannel`

* fix: thread types

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-20 20:32:45 +00:00
Almeida
25c27eac14 fix: export missing escapeX() functions (#8944)
fix: export missing escapeX functions

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-20 16:20:43 +00:00
Qjuh
5eab5fc06c fix(WebSocketShard): only cleanup the connection if a connection still exists (#8946)
fix(WebSocketShard): only cleanup if connection
2022-12-18 15:18:07 +00:00
iCrawl
0cf29abcf0 chore(formatters): release @discordjs/formatters@0.1.0 2022-12-17 16:54:06 +01:00
Jiralite
dd62be077d docs(GuildForumThreadManager): Fix sticker type (#8940) 2022-12-16 18:20:11 +01:00
Jiralite
83eafb6146 chore: Add backport label (#8942) 2022-12-16 18:19:44 +01:00
Almeida
18b3a19810 fix: add @discordjs/formatters to dependency list (#8939) 2022-12-16 17:56:29 +01:00
Almeida
c76e170786 fix(resolveColor): invalid colors (#8933)
Fixes https://github.com/discordjs/discord.js/issues/8932
2022-12-16 14:28:18 +01:00
Almeida
cbafd479b3 feat(ForumChannel): add defaultForumLayout (#8895)
* feat(ForumChannel): add `defaultForumLayout`

* fix: lockfile
2022-12-16 13:27:11 +00:00
iCrawl
19519ec9fc chore(core): release @discordjs/core@0.3.0 2022-12-16 14:10:45 +01:00
iCrawl
166f742d02 fix(core): instantiate/export role connections 2022-12-16 14:09:51 +01:00
iCrawl
7a61004627 chore(core): release @discordjs/core@0.2.0 2022-12-16 03:59:25 +01:00
iCrawl
82f4827ee5 chore(ws): release @discordjs/ws@0.6.0 2022-12-16 03:55:39 +01:00
iCrawl
e470e088ab chore(rest): release @discordjs/rest@1.5.0 2022-12-16 03:53:13 +01:00
Suneet Tipirneni
3d6fa248c0 feat(core): Add support for role connections (#8930) 2022-12-16 03:32:00 +01:00
Suneet Tipirneni
273ba45e27 chore: use satisfies where applicable (#8884)
* chore: use satisfies where applicable

* chore: remove unneeded eslint ignores

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-16 02:12:38 +00:00
Suneet Tipirneni
7a5134459c feat: add support for nsfw commands (#7976)
* chore: update

* fix: add edit changes

* chore: make requested changes

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-16 02:04:56 +00:00
Tristan Camejo
6540914b4a refactor(sharding): use switch statement (#8928) 2022-12-15 08:07:28 +00:00
Ben
627511d652 feat(InteractionResponse): createdTimestamp (#8917)
* feat(InteractionResponse): createdTimestamp

* feat(InteractionResponse): createdTimestamp

* Apply suggestions from code review

Co-authored-by: MrMythicalYT <91077061+MrMythicalYT@users.noreply.github.com>

Co-authored-by: MrMythicalYT <91077061+MrMythicalYT@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-14 21:35:40 +00:00
MrMythicalYT
a7b55c1460 refactor: use consistent naming for options (#8901)
* refactor: use consistent naming for options

* chore: update param names in typings

* chore: update forgotten `data` param

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

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-14 21:32:38 +00:00
Jiralite
1b151db59c refactor(CommandInteractionOptionResolver): Loosen mentionable checks (#8910)
refactor(CommandInteractionOptionResolver): loosen mentionable checks

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-14 21:29:29 +00:00
Qjuh
aa8c57dab6 fix(WebSocketShard): clear listeners on reconnect (#8927) 2022-12-14 21:23:20 +00:00
muchnameless
b14604abde fix: re-export formatters (#8909)
* fix: re-export formatters

* future-proof typings

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-12 08:49:24 +00:00
Almeida
73300c75fa feat: add links to each routes documentation (#8898) 2022-12-07 16:32:55 +00:00
Almeida
3dede75621 fix(thread): get() route (#8897)
Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-07 14:27:01 +00:00
Almeida
3f555d5ddf feat(interactions): add messageId parameter to deleteReply() (#8896) 2022-12-07 14:23:42 +00:00
Jiralite
976b234e9d docs: Fix deprecated links (#8907)
docs: fix malformed deprecated descriptions

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-06 16:30:48 +00:00
MrMythicalYT
c48ff5e420 docs(UserFlagsBitField): make .Flags static (#8902)
Co-authored-by: Aura Román <kyradiscord@gmail.com>
2022-12-06 16:27:12 +00:00
Jiralite
6acf759f63 fix: Deprecate workflow fix (#8903)
fix: deprecate workflow fix

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-06 10:29:35 +00:00
iCrawl
fb70df817c ci: fix ref name 2022-12-03 17:05:37 +01:00
iCrawl
86959bad49 chore: update next 2022-12-03 10:43:51 +01:00
iCrawl
a0d6bc49c6 refactor: remove revalidation 2022-12-02 19:09:58 +01:00
MrMythicalYT
45faa19982 feat(Guild): add disableInvites method (#8801)
* feat(GuildInviteManager): add setDisabled method

* fix: formatting

* refactor: move helper method to `Guild`

* fix: rename method

* fix: add newline before jsdoc

* fix: remove disallowed trailing space

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

Co-authored-by: Hackerboi 69 <62872992+thehackerboi69github@users.noreply.github.com>

Co-authored-by: Hackerboi 69 <62872992+thehackerboi69github@users.noreply.github.com>
Co-authored-by: Aura Román <kyradiscord@gmail.com>
2022-12-02 13:21:59 +00:00
DD
8f552a0e17 refactor(WebSocketShard): identify throttling (#8888)
* refactor(WebSocketShard): identify throttling

* chore: add worker handling

* refactor: worker handling

* chore: update tests

* chore: use satisfies where applicable

* chore: add informative comment

* chore: apply suggestions

* refactor(SimpleContextFetchingStrategy): support multiple managers
2022-12-02 13:04:09 +00:00
Suneet Tipirneni
3fca638a84 feat: add @discordjs/formatters (#8889)
* feat: add @discordjs/formatters

* chore: make requested changes

* chore: make requested changes

* chore: fix other places

* chore: make requested changes

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-02 12:55:00 +00:00
iCrawl
4e4cbb3418 fix: revalidate on page level instead 2022-12-02 11:31:59 +01:00
iCrawl
52f56d3c2e chore: deps 2022-12-01 21:01:19 +01:00
DD
40b504a208 fix(WebSocketShard): send ratelimit handling (#8887)
* fix(WebSocketShard): send ratelimit handling

* chore: remove unnecessary else

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-01 10:58:00 +00:00
iCrawl
322cb99049 chore(discord.js): release discord.js@14.7.1 2022-12-01 11:53:40 +01:00
Jiralite
11d195d04f fix: Prevent crash on no select menu option (#8881)
* fix: no crash on no option

* refactor: consistency in ??

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-01 10:49:14 +00:00
Almeida
f13ff5c6d3 feat(createPackage): sort label files (#8892)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-01 10:02:44 +00:00
Jiralite
5e4331062b chore: Add brokers to package list and labels in issue forms (#8893)
chore: add brokers and sort list

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-01 10:00:04 +00:00
Almeida
fff3602a8a fix(createPackage): invalid label/path on labeler file (#8891)
* fix(createPackage): invalid label/path on labeler file

* fix: `packages:ui` label
2022-12-01 09:55:31 +00:00
iCrawl
72c30d1578 revert: theme fix 2022-11-30 04:41:07 +01:00
iCrawl
2cb1000a3a fix: move back to old theming 2022-11-30 04:34:47 +01:00
iCrawl
8a39c14921 fix: generate correct paths after moving catch-all 2022-11-30 04:26:40 +01:00
iCrawl
4ae029dfe2 fix: path generation 2022-11-30 04:16:27 +01:00
iCrawl
2849af0118 refactor: correctly generate routes 2022-11-30 03:55:23 +01:00
iCrawl
90d192078f fix: generate paths 2022-11-30 03:17:47 +01:00
iCrawl
b0f9b9c344 fix: next-themes 2022-11-30 02:22:00 +01:00
iCrawl
6bcebd4867 fix: including readme files 2022-11-29 01:06:02 +01:00
iCrawl
1efa95337f fix: dynamicParams bug 2022-11-29 00:36:23 +01:00
iCrawl
2f4bdf7394 fix: remove output file tracing option 2022-11-29 00:20:23 +01:00
iCrawl
4b9b62416b fix: reading readme files 2022-11-29 00:10:01 +01:00
iCrawl
208378b214 chore: fix changelog 2022-11-28 23:19:34 +01:00
iCrawl
6e65b45b31 chore(discord.js): release discord.js@14.7.0 2022-11-28 23:00:38 +01:00
iCrawl
2b260bd4bb chore: deps 2022-11-28 22:53:19 +01:00
iCrawl
cab692409d chore(voice): release @discordjs/voice@0.14.0 2022-11-28 22:51:40 +01:00
iCrawl
0fe503b516 chore(ws): release @discordjs/ws@0.5.0 2022-11-28 22:50:16 +01:00
iCrawl
999bc2069e chore(proxy): release @discordjs/proxy@1.2.1 2022-11-28 22:48:38 +01:00
iCrawl
b89bd6f67c chore(rest): release @discordjs/rest@1.4.0 2022-11-28 22:46:13 +01:00
iCrawl
5235ad5bfe chore(collection): release @discordjs/collection@1.3.0 2022-11-28 22:44:33 +01:00
iCrawl
3bd8458e09 chore(builders): release @discordjs/builders@1.4.0 2022-11-28 22:41:50 +01:00
iCrawl
44696c0a6a chore(brokers): release @discordjs/brokers@0.1.0 2022-11-28 22:39:02 +01:00
iCrawl
b5d8b69452 chore: deps 2022-11-28 22:33:21 +01:00
Almeida
7430c8e4c8 fix: remove casts when using makeURLSearchParams() (#8877) 2022-11-28 22:22:02 +01:00
Suneet Tipirneni
1a10f48bc3 feat(website): add link to discord-api-types (#8866)
fix: merge conflicts

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-28 18:18:26 +00:00
Jiralite
e592852e42 ci: Fix typo for /core labels (#8878) 2022-11-28 19:15:10 +01:00
Aura Román
8376e2dbcd refactor: update makeURLSearchParams to accept readonly non-Records (#8868) 2022-11-28 09:20:27 +01:00
Jiralite
ed68a1af5b chore: Update /core constants (#8874) 2022-11-28 09:14:16 +01:00
iCrawl
ebf9991df7 fix: readd react-use alias for astro 2022-11-28 06:13:53 +01:00
iCrawl
31e67c4316 build: smaller bundle size for websites 2022-11-28 05:55:08 +01:00
iCrawl
2f4bfedca1 chore: deps 2022-11-28 03:39:50 +01:00
Suneet Tipirneni
2127b32d26 feat: Add @discordjs/core (#8736)
* feat: add @discordjs/core

* chore: lint

* chore: add all gateway events

* chore: add the rest of the rest routes

* chore: cleanup gateway

* chore: rename gateway to client

* chore: rename gateway to client

* fix: don't spread unless we need to

* refactor: use classes and make requested changes

* chore: show shardId on emit

* chore: add interface for intrinsic props

* refactor: scope dispatch data instead of spreading

* chore: add utility for uploading files for messages and interactions

* feat: finish up form data handling

* chore: add readme

* chore: update api-extractor stuff

* chore: bump deps

* chore: make requested changes

* chore: make requested changes

* Update package.json

* chore: make requested changes

* fix: add missing interaction responses

* chore: make some requested changes

* chore: remove `return await`

* chore: use autoModeration instead of automod

* refactor: use snowflakes and -types results

* chore: sort imports, fix return type on editUserVoiceState

* chore: rename bots to users

* feat: add automod dispatch events

* refactor: move templates and members into guild

* fix: use users instead of bots in api class

* chore: imports

* chore: make requested changes

* fix: don't make files required on interaction replies

* fix: rename sendMessage to createMessage

* feat: add application command routes

* feat: add webhook.execute overloads and options to invites.get

* chore: use create prefixes

* chore: seperate interaction params

* chore: use Id

* chore: make requested changes

* chore: make requested changes

* chore: make requested changes

* chore: for -> from

* Apply suggestions from code review

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

* Update packages/core/README.md

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

* chore: make requested changes

* chore: update -types

* chore: bump vitest

* fix: sticker uploading

* fix: lockfile

* chore: make requested changes

* chore: make requested changes

* Update packages/core/src/api/applicationCommands.ts

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

* Apply suggestions from code review

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

* Update packages/core/README.md

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

* Apply suggestions from code review

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

Co-authored-by: almeidx <almeidx@pm.me>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-27 21:23:13 +00:00
Suneet Tipirneni
12553da135 feat(website): add app dir (#8869)
Co-authored-by: iCrawl <buechler.noel@outlook.com>
2022-11-27 16:24:34 +01:00
MrMythicalYT
decbce4010 feat(Webhook): add channel property (#8812)
* feat(Webhook): add `channel` property

* fix: allow ForumChannel type

* fix: disallow thread channel type

* fix: formatting

* Apply suggestions from code review

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

Co-authored-by: Aura Román <kyradiscord@gmail.com>
2022-11-26 13:31:05 +01:00
iCrawl
9922151266 refactor: docker image for proxy-container 2022-11-26 02:09:05 +01:00
iCrawl
f0120538bb build: better turbo config 2022-11-26 02:07:56 +01:00
Suneet Tipirneni
650f4ddfb2 feat(guide): add next and previous page buttons (#8777) 2022-11-25 21:49:36 +01:00
iCrawl
56d086022f ci: fetch all branches 2022-11-25 20:13:03 +01:00
iCrawl
909a02e2ad ci: test changes 2022-11-25 19:57:50 +01:00
iCrawl
ac0851b5b1 ci: fetch with a depth of 5 2022-11-25 19:55:45 +01:00
iCrawl
1ef42e4e7b chore: nextjs 13 changes 2022-11-25 19:33:30 +01:00
iCrawl
db346e014f ci: don't forward filter option 2022-11-25 19:19:57 +01:00
iCrawl
8f5b167483 build: only run scripts on changed content 2022-11-25 19:15:44 +01:00
MrMythicalYT
ec37f137fd types(Formatters): allow boolean in formatEmoji (#8823)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-25 17:42:48 +00:00
Almeida
f9828034cd fix(MessageMentions): add InGuild generic (#8828)
fix(MessageMentions): add InGuild generic

Co-authored-by: Noel <buechler.noel@outlook.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-25 17:35:52 +00:00
Jaworek
cb77fd02d0 docs: describe InteractionEditReplyOptions (#8840)
* docs: add 'description' to interactionreplyoptions

* Update packages/discord.js/src/structures/interfaces/InteractionResponses.js

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

Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-25 17:26:33 +00:00
Eejit
7e06f68185 fix(Activity): Fix equals() not checking for differing emoji (#8841)
* Fix presence updating

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

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

* Update Presence.js

* Better emoji checking

* Revert "Better emoji checking"

This reverts commit 44d52bfde8.

Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-25 17:17:55 +00:00
Jiralite
d2754802cc docs(AutoModerationRuleManager): Describe cache (#8848)
docs(AutoModerationRuleManager): describe cache
2022-11-25 15:24:19 +00:00
Suneet Tipirneni
7ae0c529f2 chore(scripts): cleanup create-package script (#8862)
Co-authored-by: Noel <buechler.noel@outlook.com>
2022-11-25 15:36:04 +01:00
iCrawl
7332b7bae3 chore: switch order of vite plugins 2022-11-25 14:43:30 +01:00
iCrawl
33a82b7bce chore: next 13 2022-11-25 14:29:32 +01:00
Jeroen Claassens
d0c82561b8 fix: fixed react/astro/guide/discord.js build, updated dependencies, fix crawlvatar (#8861) 2022-11-25 14:02:18 +01:00
iCrawl
256677b435 chore: deps 2022-11-23 09:34:56 +01:00
iCrawl
ee7d2fd4c8 chore: deps 2022-11-22 13:35:47 +01:00
Jiralite
65bc0adbf4 docs: Fix message action row components (#8819)
* docs: fix message action row components

* docs: remove unused external links

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-19 22:20:49 +00:00
Jiralite
fd4ba5eaba feat: Auto Moderation (#7938)
* feat: initial AutoMod commit

* types: Typo in class name

Co-authored-by: Jonathan <54381371+axisiscool@users.noreply.github.com>

* refactor: move things around

* refactor: remove undocumented property

* chore: add new intents to issue form

* feat: add initial basic manager

* feat(AutoModRule): add new properties

* feat: add events

* feat(GuildAuditLog): cache rules

* refactor: move JSDoc to where it is actually used

* refactor(AutoModRule): add `_patch()` method

* feat(AutoModRuleManager): add resolvers

* feat(Sweepers): add new manager

* types: nullify first parameter of `autoModerationRuleUpdate`

* types: add manager to `Caches`

* docs(AutoModRule): update `metadata` docstring

* feat: add execution event

* fix(AutoModActionExecution): export class

* refactor(AutoModRule): `triggerType` is not modifiable

* docs(AutoModRule): link class

* feat: add trigger metadata definitions

* docs(AutoModRule): typos

* feat(AutoModRule): action metadata

* types: Proper casing of name

Co-authored-by: MateoDeveloper <79017590+Mateo-tem@users.noreply.github.com>

* refactor: only patch data if exists

* types: `preset` is an array

* types(AutoModRuleActionMetadata): nullify all

* feat(AutoModRuleManager): add `fetch()`

* docs(AutoModRule): tweak some wording

* docs(AutoModRule): use "array" over "list"

* docs(AutoModRuleResolvable): fix union

* types: adjust some names

* feat(AutoModRuleManager): add `create()`

* feat(AutoModRuleManager): add `delete()`

* refactor: prefer full auto moderation name

* docs(AutoModerationRuleManager): fix a fetch example

* refactor(Sweepers): alphabetise methods

* chore: remove testing

* fix(AutoModerationRuleCreateOptions): add `reason`

* fix: typo for `presets`

* fix(AutoModerationRuleCreateOptions): `actions` is required

* fix(AutoModerationRuleManager): handle properties that are unrequired

* feat(AutoModerationRuleManager): add `edit()`

* feat(GuildAuditLogsEntry): add auto moderation rules

* refactor: prefer "AutoModerationActionExecutionAction"

* refactor: annotate todos and doc fixes

* feat(AutoModerationRule): add guild getter

* docs(AutoModerationRule): rule -> auto moderation rule

* docs(AutoModerationRuleEditOptions): `eventType` is optional

* feat(AutoModerationRule): add helpers

* docs: random string updates

* chore: add TODOs

* feat(AutoModerationActionExecution): add helpers

* feat: support role and channel resolvables

* chore: high priority todo to keep me in solitary

* refactor(AutoModerationActionMetadataOptions): allow resolvables

* chore: tidy up from merge

* docs(AutoModerationRule): document extension

* feat: export `AutoModerationRuleManager`

* chore(ActionsManager): add new actions

* chore: add to websocket index

* refactor(AutoModerationActionExecution): send the guild across

* docs(AutoModerationActionExecution): typo

* docs(AutoModerationRule): deduplicate a word

* docs(Guild): dot

* test: add some basic tests

* docs(AutoModerationRuleManager): fetch is optional

* docs(AutoModerationActionExecution): prefer non-links

* types: `presets` is an array of numbers

* docs(AutoModerationRuleEditOptions): `name` is optional

* docs(AutoModerationRule): fix type for `exemptChannels`

* docs(AutoModerationRuleUpdateAction): remove "object"

* feat: add `allow_list`

* fix(GuildAuditLogsEntry): pass guild

* docs(AutoModerationRuleManager): correct fetch example

* chore: prettier

* refactor: remove unneeded optional chaining operator

* feat: add mention limit

* docs(AutoModerationRuleManager): document new requirement

* refactor: conform to message content intent

* docs: document permission for event

* docs: refactor intent message

* docs: dot

* docs: remove string in link

* refactor: document upstream changes

* fix(AutoModerationRuleDelete): Correct event fire

Co-authored-by: GoldenAngel <50855202+GoldenAngel2@users.noreply.github.com>

* feat(AutoModerationRule): Add `setMentionTotalLimit()` helper method

* feat(AuditLogEntries): add new extra fields

* types: add `guild` in constructors

* types: update typings

* refactor(AutoModerationRuleManager): `&&` shorthand

* types: remove leftover type

* chore: types

* docs: update API types

* docs: Tweak guild wording

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

* feat: add regular expression matching

* docs: update `allowList` wording

* refactor: deduplicate `guildId`

Co-authored-by: Jonathan <54381371+axisiscool@users.noreply.github.com>
Co-authored-by: MateoDeveloper <79017590+Mateo-tem@users.noreply.github.com>
Co-authored-by: GoldenAngel <50855202+GoldenAngel2@users.noreply.github.com>
Co-authored-by: Aura Román <kyradiscord@gmail.com>
2022-11-19 22:06:13 +00:00
Almeida
153d2403ad chore: turbo cache coverage (#8836)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-19 21:59:06 +00:00
Jiralite
8ed5c1beb6 docs: Specify ActionRowBuilder for components (#8834)
docs: `ActionRowBuilder` for `components`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-19 21:50:04 +00:00
MrMythicalYT
09f65b724b docs: add @extends for select menu classes (#8824)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-19 21:43:00 +00:00
Synbulat Biishev
291f36cd73 feat: add Collection#subtract() (#8393)
* feat: add `Collection#missing()`

* test: add test for `Collection#missing()`

* chore: rename `missing` to `complement`

* docs: fix name

* test: fix test name

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

* chore: sort alphabetically

* fix: edit condition

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

* refactor: rename to `subtract`

* docs: fix description

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

* fix: change condition

* fix: resolved eslint formatting error

Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Aura Román <kyradiscord@gmail.com>
2022-11-19 21:34:26 +00:00
Jaworek
b2fabd130a feat(SelectMenuInteractions): add values property (#8805)
* fix: add values property

* fix: improve wording

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

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

Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-19 21:27:14 +00:00
Suneet Tipirneni
abefc4f809 docs: add section on testing local changes (#8802)
* docs: add section on testing local changes

* chore: use the root command for watching

* Update .github/CONTRIBUTING.md

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

* Update .github/CONTRIBUTING.md

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

* Update .github/CONTRIBUTING.md

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

* Update .github/CONTRIBUTING.md

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

Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-19 21:17:19 +00:00
RedGuy12
d6873b7159 fix(escapeMarkdown): fix double escaping (#8798)
* fix(escapeMarkdown): fix double escaping

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

* remove cruft

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

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-19 21:08:33 +00:00
RedGuy12
017f9b1ed4 fix(Transfomers): call .toJSON in toSnakeCase (#8790)
* fix(Transfomers): call `.toJSON` in `toSnakeCase`

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

* fix: move it under the Date check

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

* fix(toSnakeCase): stop assuming `toJSON` returns snake_case values

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

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-19 21:01:41 +00:00
Idris
e74aa7f6b0 feat(ThreadChannel): add a helper for pin and unpin (#8786)
* feat(ThreadChannel): add a helper for pin and unpin

* fix: remove erros

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

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

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

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

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

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

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

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

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

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

* docs(ThreadChannel): improve description

* types(ThreadChannel): fix types

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-19 20:54:43 +00:00
Synbulat Biishev
ff85481d3e feat: add Message#bulkDeletable (#8760)
* feat: add `Message#bulkDeletable`

* feat: add requested changes

* fix: add check for `ManageMessages` permission

* fix: `.permissionsFor()` exist only in guild channels

* feat: apply requested changes

* types: add type

* fix: do not return `undefined`

* fix: add property to docs

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-06 03:51:34 +00:00
Jaworek
68c9cb37bc docs: make WebSocketShard.lastPingTimestamp public (#8768)
Make WebSocketShard.lastPingTimestamp public
2022-11-02 13:29:53 +00:00
DD
5152abf728 feat: new select menus (#8793)
* feat(builders): new select menus

* chore: better re-exporting of deprecated classes

* feat: new select menus

* chore: typings

* chore: add missing todo comment

* chore: finish updating tests

* chore: add runtime deprecation warnings

* chore: format deprecation warning

* feat(BaseInteraction): isAnySelectMenu

* chore: requested changes

* fix: deprecation comments

* chore: update @deprecated comments in typings

* chore: add tests for select menu type narrowing

* fix: bad auto imports

Co-authored-by: Julian Vennen <julian@aternos.org>

* fix: properly handle resolved members

* fix: collectors

* chore: suggested changes

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

* fix(typings): bad class extends

* feat(ChannelSelectMenuBuilder): validation

* chore: update todo comment

* refactor(ChannelSelectMenu): better handling of channel_types state

* chore: style nit

* chore: suggested nits

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

Co-authored-by: Julian Vennen <julian@aternos.org>
Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-01 17:36:05 +00:00
MrMythicalYT
8b400ca975 feat(InteractionResponses): add message parameter (#8773) 2022-10-31 19:04:42 +01:00
Saya
88cd9d9060 feat: support resume urls (#8784)
Co-authored-by: Almeida <almeidx@pm.me>
2022-10-31 19:03:51 +01:00
ckohen
5a70057826 fix(SequentialHandler): downlevel ECONNRESET errors (#8785) 2022-10-31 19:03:38 +01:00
Almeida
0bcc18a0bd fix(brokers): publish the scripts folder (#8794) 2022-10-31 19:01:49 +01:00
Gabriel Thomé
b5213664fa feat: allow punctuation characters in context menus (#8783)
Co-authored-by: Gabriel Thomé <114624098+gabriel-thome-GVNG@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-31 12:28:29 +00:00
advaith
6e348ffd1d docs(MessageReplyOptions): remove duplicate stickers field (#8766)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2022-10-31 11:39:27 +00:00
DD
e7cbc1bf11 fix(BaseRedisBroker): proper import path to lua script (#8776)
* fix(BaseRedisBroker): proper import path to lua script

* chore: fix tests

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-27 19:47:00 +00:00
Almeida
53d8e87d7f fix: censor token in debug output (#8764)
Co-authored-by: Aura Román <kyradiscord@gmail.com>
2022-10-27 12:50:11 +00:00
Ryan Munro
fc10774461 feat: allow deletion of ephemeral messages (#8774)
* feat: allow deletion of ephemeral messages

* fix: restore missing key

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-27 11:22:12 +00:00
hackermon
68d5712dea fix: make ratelimit timeout require event loop to be active (#8779)
* fix issue with ratelimits not working correctly

related to #8757

The ``ref`` option doesn't require the Node.js event loop to remain active when waiting for the timeout causing the program to end if there isn't an active gateway connection.

* Update packages/rest/src/lib/handlers/SequentialHandler.ts

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

* Update packages/rest/src/lib/handlers/SequentialHandler.ts

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

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2022-10-23 10:45:02 +00:00
iCrawl
b2658ce504 chore: update eslint-config-neon 2022-10-20 03:39:38 +02:00
iCrawl
3cc50b9e95 chore: deps 2022-10-20 03:11:41 +02:00
iCrawl
c0e3629f64 ci: properly cache yarn deps 2022-10-20 02:52:59 +02:00
iCrawl
7083df7cef fix: styling and separation border for enums/interfaces 2022-10-17 23:40:34 +02:00
Synbulat Biishev
caeb1cbfdb feat(GuildChannelManager): add .addFollower() method (#8567)
* feat(GuildChannelManager): add `.addFollower()` method

* docs: dpply suggestions

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

* fix: resolve from `GuildChannelManager`

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

* types: correct channel type

* docs: update description

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

* docs: update description

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

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: A. Román <kyradiscord@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-16 16:04:30 +00:00
iCrawl
4f3c13628e fix: include brokers readme 2022-10-14 23:46:35 +02:00
iCrawl
94097d365a fix: default to main for stable selection 2022-10-14 23:38:08 +02:00
iCrawl
8af0b38b6c fix: fallback to main 2022-10-14 23:29:37 +02:00
Jiralite
66097e0cb0 chore: Bump discord-api-types (#8752) 2022-10-14 23:20:26 +02:00
DD
bf9aa1858d feat: @discordjs/brokers (#8548) 2022-10-13 22:20:36 +02:00
Jiralite
179392d6d7 docs: Remove unused imports (#8744) 2022-10-13 00:24:04 +02:00
Almeida
ea807e3eed chore: remove downlevel-dts dependency from template (#8743) 2022-10-12 18:47:51 +00:00
Jiralite
ef29b5e51f chore: Redirect voice examples to the new repository (#8737) 2022-10-12 12:27:02 +02:00
Almeida
cb3826ce6d refactor(Embed): use embedLength function from builders (#8735) 2022-10-12 11:39:28 +02:00
Almeida
d7a45a0567 chore: update api-extractor configurations (#8738) 2022-10-12 11:38:14 +02:00
Suneet Tipirneni
49b91315f7 fix: extract text from link tags for descriptions (#8739) 2022-10-12 11:37:07 +02:00
StarkRights
5ffabb119f fix: voice postbuild script (#8741) 2022-10-12 11:35:55 +02:00
iCrawl
eb46e3a5ad feat: add model description to open-graph 2022-10-11 16:12:16 +02:00
iCrawl
e8f63617a2 chore: deps 2022-10-11 16:01:45 +02:00
Suneet Tipirneni
b05be9ec08 feat(website): Add utility for resolving summaries for json items (#8734) 2022-10-11 16:01:32 +02:00
iCrawl
9d8179c6a7 fix: pin @types/node version
https://github.com/DefinitelyTyped/DefinitelyTyped/pull/62629#issuecomment-1273892057
2022-10-11 14:32:38 +02:00
iCrawl
f92be4fb94 refactor: simplify path logic 2022-10-11 11:13:25 +02:00
iCrawl
c39faa94f6 chore: cleanup code 2022-10-11 09:36:36 +02:00
iCrawl
7b7cc6fde4 fix: localhost url for og:image 2022-10-11 08:54:07 +02:00
iCrawl
05fbe992e3 feat: og generation for models 2022-10-11 08:46:22 +02:00
iCrawl
698983b203 chore: deps 2022-10-11 04:09:02 +02:00
iCrawl
8b7ce2b61d feat: inline code highlight 2022-10-11 04:06:14 +02:00
iCrawl
e17323c15c fix: only include used fonts 2022-10-11 03:51:46 +02:00
iCrawl
f75f13d75b feat: add og image gen 2022-10-11 03:34:29 +02:00
Almeida
d587467a38 chore: use @link instead of markdown link in tsdocs (#8732)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-10 20:03:35 +00:00
iCrawl
5bfb61d5b8 ci: fix documentation workflow 2022-10-10 21:38:11 +02:00
iCrawl
c5d5840fef chore(discord.js): release discord.js@14.6.0 2022-10-10 19:20:16 +02:00
iCrawl
a4bf975f49 chore(ws): release @discordjs/ws@0.4.1 2022-10-10 19:19:21 +02:00
DD
c2b677759b fix(WebSocketShard): dispatch race condition (#8731) 2022-10-10 19:15:04 +02:00
MrMythicalYT
ac83ada306 types: fix events augmentation (#8681) 2022-10-10 19:14:49 +02:00
Almeida
02ffce8173 chore: make 'Note to developers' on version constant a regular comment (#8730)
chore: make 'Note to developers' a regular comment

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-10 14:42:03 +00:00
Almeida
caba122d20 fix: app paths (#8729) 2022-10-10 16:30:05 +02:00
RedGuy12
7b8966bca1 feat(Util): escape more markdown characters (#8701)
* feat(Util): escape more markdown characters

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

* types(EscapeMarkdownOptions): update types

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

* fix: lists bulleted with `*`

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

* tests(escapeMarkdown): add tests

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

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-10 05:23:05 +00:00
iCrawl
3ed668e539 chore: move website and guide out of packages 2022-10-10 01:22:48 +02:00
NaeHyeok Jeong
0a9d57b011 chore: change token in readme to constant (#8688)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-09 21:27:46 +00:00
JPBM135
a31e605e09 docs(Utils): remove private from parseEmoji (#8718)
chore(Utils): remove `private` from `parseEmoji`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-09 21:19:53 +00:00
Cit The Dev
7556db243d docs: update UserContextMenuCommandInteraction documentation (#8717)
* Updated documentation for UserContextMenuCommandInteraction class

* Apply suggestions from code review

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

Co-authored-by: Noel <buechler.noel@outlook.com>
Co-authored-by: A. Román <kyradiscord@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-09 20:39:05 +00:00
Idris
4c2955a5de fix(ClientOptions): make ClientOptions#intents returns an IntentsBitField (#8617)
* fix(ClientOptions): make ClientOptions#intents returns an instance of IntentsBitField

* fix: client.options

* fix(types): Client#options

* fix(WebSocketShard): remove require for IntentsBitField

* fix(eslint): yarn format
2022-10-09 20:05:50 +00:00
iCrawl
5f72d8b645 fix: website fonts 2022-10-09 02:10:35 +02:00
iCrawl
a5d2ce2059 fix: alert component text selection 2022-10-09 01:23:54 +02:00
Ryan Munro
e548e6a10b fix: correctly construct a builder (#8727) 2022-10-09 01:07:12 +02:00
1Computer1
6fd331dd52 fix(Components): error with unknown components (#8724) 2022-10-09 01:06:37 +02:00
iCrawl
32297d4717 feat: prefetch pages for better navigation 2022-10-09 01:03:44 +02:00
Suneet Tipirneni
1b4f69b00a feat(guide): add github links for pages (#8725) 2022-10-09 00:58:28 +02:00
iCrawl
1ea7664aa3 fix: remove turbo experiment again 2022-10-09 00:19:53 +02:00
iCrawl
723c0b9b55 fix: 404 not resolving 2022-10-08 23:59:47 +02:00
iCrawl
f0dd41fc93 build: compress prod build 2022-10-08 23:27:07 +02:00
iCrawl
b6c0ab8a41 feat: implement turbo for navigation 2022-10-08 22:49:56 +02:00
iCrawl
6120971ef8 fix: height styling on toc 2022-10-08 22:34:45 +02:00
iCrawl
87ec3922a3 chore: update readmes 2022-10-08 17:55:01 +02:00
iCrawl
3f006cd33c build: fix cliff-jumper config 2022-10-08 17:32:07 +02:00
iCrawl
4bdd120e62 chore: deps 2022-10-08 16:55:34 +02:00
iCrawl
c0ea782dd4 chore(ws): release @discordjs/ws@0.4.0 2022-10-08 16:37:07 +02:00
iCrawl
ca21dc0f3b chore(voice): release @discordjs/voice@0.13.0 2022-10-08 16:36:59 +02:00
iCrawl
4a57b3947a chore(rest): release @discordjs/rest@1.3.0 2022-10-08 16:36:35 +02:00
iCrawl
41d1c2eefc chore(proxy): release @discordjs/proxy@1.2.0 2022-10-08 16:36:20 +02:00
iCrawl
60c70389a4 chore(collection): release @discordjs/collection@1.2.0 2022-10-08 16:35:58 +02:00
iCrawl
f06d12fd73 chore(builders): release @discordjs/builders@1.3.0 2022-10-08 16:34:30 +02:00
iCrawl
dc31b76465 ci: update workflow for tags 2022-10-08 16:33:37 +02:00
iCrawl
ba90f14f9b feat: auto-link headings 2022-10-08 15:44:00 +02:00
iCrawl
7b76b0b7e7 fix: proper root margin values for intersection observer 2022-10-08 14:31:26 +02:00
iCrawl
63939f8219 feat: automatic hash for anchors on scroll 2022-10-08 14:04:00 +02:00
Suneet Tipirneni
33ec49d5bf feat(guide): add outline for pages (#8722)
Co-authored-by: iCrawl <buechler.noel@outlook.com>
2022-10-08 05:15:02 +02:00
Jeroen Claassens
d923d0ab96 build: switch to esbuild-plugin-version-injector for injecting version strings (#8723) 2022-10-08 02:54:45 +02:00
iCrawl
62332c2720 chore: deps 2022-10-07 20:26:45 +02:00
Parbez
7af3c3b6f1 fix: ws package.json path (#8720) 2022-10-07 19:42:04 +02:00
iCrawl
5730866073 feat: alert & discord components 2022-10-07 17:49:03 +02:00
Parbez
9f68d73706 fix: cliff.toml styling (#8716) 2022-10-07 13:57:48 +02:00
Noel
0ac3e766bd feat: web-components (#8715) 2022-10-07 06:56:13 +02:00
iCrawl
76a7021452 chore: deps 2022-10-07 02:49:44 +02:00
iCrawl
103cb16be0 refactor: improve deprecation block 2022-10-07 02:45:04 +02:00
iCrawl
baa6c69835 refactor: improve tips/warnings 2022-10-07 02:44:28 +02:00
Suneet Tipirneni
f85022162d feat(scripts): Add script to create a @discordjs package (#8711) 2022-10-07 02:38:58 +02:00
iCrawl
35bfba0c50 fix: info and caution components 2022-10-07 01:14:49 +02:00
iCrawl
ecfe4e3f1c fix: index page 2022-10-07 00:33:41 +02:00
Noel
2628659747 feat: astro guide (#8714) 2022-10-06 23:53:35 +02:00
ckohen
01d75c8b8b fix(Client): don't auth for webhook fetches with token (#8709)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-06 19:43:00 +00:00
iCrawl
b64d657241 chore: removing building website from pre-commit 2022-10-06 12:36:26 +02:00
Almeida
7e51ea0ada chore(util): add missing cliff-jumper config file (#8707) 2022-10-06 12:11:19 +02:00
Almeida
aec44a0c93 refactor: rename Error to DiscordjsError internally (#8706)
* refactor: rename Error to DiscordjsError internally

* chore: remove globalThis usage

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-06 09:21:03 +00:00
iCrawl
e745b95677 chore: deps 2022-10-05 20:57:39 +02:00
Suneet Tipirneni
9effd82abe docs: fix AwaitMessageComponentOptions typedef (#8696)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-05 20:41:36 +02:00
SpaceEEC
628759bcff feat(GuildChannelManager): allow creating channels with a default auto archive duration (#8693) 2022-10-05 20:41:15 +02:00
muchnameless
a306219673 fix: re-export util (#8699) 2022-10-05 20:40:50 +02:00
Suneet Tipirneni
c0f7a1a89a types(Message): remove & this from #inGuild typeguard (#8704) 2022-10-05 20:40:28 +02:00
Julian
a7eab50ee3 fix(WebSocketShard): add ready data parameter to ready event (#8705) 2022-10-05 20:39:05 +02:00
Jiralite
ace974fc1f fix: Throw discord.js errors correctly (#8697)
fix: import errors correctly

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-05 16:16:07 +00:00
iCrawl
d9137c3658 chore: deps 2022-10-04 01:10:35 +02:00
iCrawl
b7fadb350a fix: sidebar menu styling 2022-10-04 01:02:37 +02:00
iCrawl
1f944b889f feat: allow search by tags 2022-10-04 00:47:15 +02:00
iCrawl
b187a18e9c feat: properly build search indicies 2022-10-04 00:46:15 +02:00
iCrawl
0b8651cf85 chore: remove building package docs with old docgen 2022-10-03 14:32:40 +02:00
iCrawl
bf92172d80 chore(util): release @discordjs/util@0.1.0 2022-10-03 14:08:03 +02:00
Suneet Tipirneni
b2ec865765 feat: add @discordjs/util (#8591)
* feat: add @discordjs/util

* fix: builders test

* refactor: make rest use lazy for ESM import

* chore: make requested changes

* Apply suggestions from code review

Co-authored-by: Parbez <imranbarbhuiya.fsd@gmail.com>
Co-authored-by: A. Román <kyradiscord@gmail.com>

* chore: make requested changes and add tests

* chore: regen lockfile

* test: add type tests

* chore: push missing files

* chore: make requested changes

* chore: update CI stuff

* chore: fix lockfile

* chore: make requested changes

Co-authored-by: Parbez <imranbarbhuiya.fsd@gmail.com>
Co-authored-by: A. Román <kyradiscord@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-02 18:00:31 +00:00
SpaceEEC
3f8656115b fix(SequentialHandler): throw http error with proper name and more useful message (#8694)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-01 14:50:18 +00:00
Almeida
883f6e9202 feat(ForumChannel): add defaultSortOrder (#8633) 2022-10-01 14:00:30 +00:00
Almeida
2ea2a85e63 types(ModalBuilder): fix constructor typings (#8690)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-01 13:53:56 +00:00
DD
f063625836 fix(proxyRequests): forward query parameters (#8691)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-01 13:46:52 +00:00
DD
6398e46043 chore(proxy-container): update README for proper request forwarding (#8692)
* chore(proxy-container): update README for proper request forwarding

* chore: remove unused import

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-01 13:40:24 +00:00
Almeida
d24dbf7d22 chore(deps): bump discord-api-types (#8685) 2022-10-01 13:30:19 +00:00
A. Román
3c231ae81a feat: add AbortSignal support (#8672)
* feat: add `AbortSignal` support

* fix: move the expect earlier

* fix: pass signal

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-25 18:44:03 +00:00
iCrawl
9f63eb977f chore(discord.js): release discord.js@14.5.0 2022-09-25 19:17:25 +02:00
iCrawl
c69f512450 chore(rest): release @discordjs/rest@1.2.0 2022-09-25 19:11:48 +02:00
iCrawl
4a07f9eaa1 chore: deps 2022-09-25 19:08:39 +02:00
Khafra
64cd53c4c2 feat(rest): use Agent with higher connect timeout (#8679)
* feat(rest): use Agent with higher connect timeout

* chore: lint

* chore: I'm an idiot

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-25 12:45:36 +00:00
MrMythicalYT
d79aa2d0d0 docs: fix duplicate typedefs (#8677)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-25 11:46:10 +00:00
Rodry
822b7f234a types(Collection): make fn return type unknown (#8676)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-25 11:40:58 +00:00
Jiralite
8ca407e089 docs(ForumChannel): Add @implements (#8678) 2022-09-25 13:27:56 +02:00
Jiralite
0126d9b810 fix(ThreadChannel): Add forum channel to parent (#8664)
fix(ThreadChannel): add forum channel to parent

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-24 14:51:11 +00:00
Jiralite
e9931229ae refactor(GuildBanManager): Add deprecation warning for deleteMessageDays (#8659)
refactor(GuildBanManager): add deprecation warning for `deleteMessageDays`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-24 14:45:30 +00:00
Jiralite
1486bc9336 types(GuildChannelManager): Handle forum channel overload (#8660)
types(GuildChannelManager): handle forum channel overload

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-24 14:40:19 +00:00
Almeida
16fcdc3687 fix(GuildChannelManager): allow creating webhooks on forums (#8661)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-24 14:34:19 +00:00
Jiralite
8622939229 fix(ForumChannel): Implement missing properties and methods (#8662)
* fix(ForumChannel): implement missing properties and methods

* refactor(ForumChannel): remove redundant default

* docs(ForumChannel): remove superfluous wording

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-24 14:28:42 +00:00
Jiralite
2487e3bf76 types(Caches): Allow GuildForumThreadManager and GuildTextThreadManager (#8665)
types: allow `GuildForumThreadManager` and `GuildTextThreadManager`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-24 14:14:43 +00:00
Maksi
578bc951bd fix: RepliableInteraction respect cached generic (#8667)
* fix: RepliableInteraction respect cached generic

* fix: prettier format

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

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>
2022-09-24 14:09:24 +00:00
Jiralite
1244854e13 fix(ThreadChannel): Allow editing flags (#8671)
fix(ThreadChannel): allow editing flags

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-24 14:02:30 +00:00
Almeida
b1e190c4f0 fix: allow adding forums to channelTypes (#8658)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-24 13:37:41 +00:00
Jaworek
fc8ed816e6 fix(GuildChannelManager): typo in flags property name when editing (#8669)
* Update GuildChannelManager.js

* Update index.d.ts

* Update GuildChannelManager.js

* Update index.d.ts
2022-09-23 20:20:46 +00:00
Almeida
abb7226af3 feat(GuildChannelManager): allow editing flags (#8637)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-21 22:00:06 +00:00
iCrawl
30ceaf7e47 chore: deps 2022-09-21 18:46:51 +02:00
iCrawl
9b40a79b3e fix: focus-ring styles 2022-09-21 15:46:44 +02:00
iCrawl
0b12d6fa10 chore(discord.js): release discord.js 14.4.0 2022-09-21 14:09:39 +02:00
Jiralite
b106956308 feat(Widget): Allow forum channels (#8645) 2022-09-21 02:57:32 +02:00
Jiralite
6f1f465a77 feat(WelcomeChannel): Add forum channel as a type (#8643) 2022-09-21 02:57:18 +02:00
Almeida
eb98372dcd chore: fix proxy-container Dockerfile (#8648) 2022-09-21 02:56:47 +02:00
Jiralite
5048a3d17a feat: Allow forum channels in webhook update event (#8646)
feat: allow forum channels in webhook update event
2022-09-20 11:51:34 +00:00
Jiralite
f0497343f1 docs: Correctly overwrite setRTCRegion method (#8642)
docs: correctly overwrite `setRTCRegion` method

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-19 21:07:58 +00:00
Jiralite
f6f15d8e87 fix: Correct applied tags type (#8641)
* fix: correct applied tags type

* types: this is never a private thread channel

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-19 21:02:36 +00:00
Jiralite
14bbc9150a types: Narrow channel type in thread managers (#8640)
types: narrow channel type in thread managers

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-19 20:00:59 +00:00
Jiralite
a7f816eeb7 fix(ThreadChannel): Make fetchStarterMessage() work in forum posts (#8638)
fix(ThreadChannel): make `fetchStarterMessage()` work in forum posts

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-19 19:55:33 +00:00
Jiralite
802b2394b0 docs(GuildTextThreadManager): Document correct @extend (#8639)
docs(GuildTextThreadManager): document correct `@extend`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-19 19:50:18 +00:00
iCrawl
c446a84570 build: trigger rebuild 2022-09-19 15:40:57 +02:00
iCrawl
9cf0a4904b chore: patch all versions of tsdoc-config 2022-09-19 15:35:29 +02:00
iCrawl
25dc146247 build: revert to using patch 2022-09-19 15:13:22 +02:00
iCrawl
a2b08aaf3b build: different import for schema 2022-09-19 14:53:57 +02:00
iCrawl
eba9cc6038 chore: deps 2022-09-19 14:41:43 +02:00
Almeida
145eb2fc5d fix: update messageCount/totalMessageSent on message events (#8635)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-19 00:38:23 +00:00
Almeida
8444576f45 docs(builders/components): document constructors (#8636) 2022-09-19 02:32:28 +02:00
iCrawl
6d43e26676 fix: border color in dark mode 2022-09-18 20:27:04 +02:00
iCrawl
2fc3d86f56 feat: searchbar 2022-09-18 20:16:50 +02:00
Suneet Tipirneni
8a8d519c9c feat: add support for guild forums (#7791)
* feat: add support for guild forums

* feat(webhook): add support for creating forum channel posts

* fix: duplicated docs

* feat: add support for message counts

* feat: add support for latest upstream changes

* fix: serialize forum channels

* types: fix channel unions

* types: fix tests

* types: fix tests (again)

* types: fix tests (again (again))

* chore: make requested changes

* chore: fix bugs and make requested changes

* types: use correct type for guild forum start messages

* chore: remove console.log

* chore: make requested changes

* chore: make requested changes

* chore: fix docs

* Update packages/discord.js/src/managers/GuildForumThreadManager.js

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

* chore: update types

* chore: make requested changes

* chore: Apply suggestions

Co-authored-by: Jaworek <jaworekwiadomosci@gmail.com>
Co-authored-by: Jonathan Rubenstein <jrubcop@gmail.com>

* fix: import `ErrorCodes`

* fix: remove defunct code

* refactor: be consistent with channel class names

* feat(GuildChannel): add flags

* fix: rename file

* refactor: channel flags are everywhere!

* fix: import flags correctly

* chore(ThreadChannel): update message count string

* docs(Channels): correct `@param` type

* docs(Channels): ignore transformGuildDefaultReaction

* refactor: emoji object in tags

* chore: renaming consistency

* fix: document default reaction emojis in patching

* fix(GuildChannelManager): document `defaultThreadRateLimitPerUser`

* chore: semicolon

* docs(ErrorCodes): document `GuildForumMessageRequired`

* refactor: transform default reactions

* docs(APITypes): Add `ChannelFlags`

* fix: convert tags properly

* fix: pass an array of snowflakes

* refactor: handle flags better

* fix(ThreadChannel): receive tags

* fix(PartialGroupDMChannel): nullify `flags`

Apparently did not do this earlier.

* chore: misc sorting

* refactor: nullify emoji on tags if not present

* refactor(ForumChannel): modify returns

* types: protect the thread manager!

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>

* chore: update `ChannelType` usage

* Update index.d.ts

* docs: Update default reaction emoji property names

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

* fix: only `name` is required when editing tags

- discord/discord-api-docs#5458

* types: add tests for `channel.flags`

* fix: allow unsetting the default reaction emoji

* refactor: remove v13 remnants

* docs: add missing closing tag

* feat: add `rateLimitPerUser`

* feat: add missing properties for create guild channel

- discord/discord-api-docs#5474

* refactor(GuildForumThreadManager): refactor message payload

* fix: handle magical `null` case

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

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Jaworek <jaworekwiadomosci@gmail.com>
Co-authored-by: Jonathan Rubenstein <jrubcop@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: A. Román <kyradiscord@gmail.com>
2022-09-18 14:23:44 +00:00
Almeida
669c3cd256 refactor: replace usage of deprecated ChannelTypes (#8625)
refactor: use new non-deprecated `ChannelType`s

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-17 13:56:19 +00:00
Suneet Tipirneni
678ceaa014 feat(website): use dropdowns for overloads (#8630)
Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: iCrawl <buechler.noel@outlook.com>
2022-09-17 14:09:54 +02:00
iCrawl
0785353efe fix: footer hiding properly 2022-09-17 00:31:28 +02:00
iCrawl
8323926304 fix: overflow in cmdk menu 2022-09-17 00:30:15 +02:00
iCrawl
bccc2c8e89 refactor: light theme for cmdk 2022-09-16 23:42:01 +02:00
iCrawl
1d72663e92 fix: allow usage of ctrl key additionally to metakey 2022-09-16 23:27:44 +02:00
iCrawl
d0a2a6227d fix: prevent default for cmd+k 2022-09-16 23:17:05 +02:00
iCrawl
735e0bf52e feat: search 2022-09-16 23:04:05 +02:00
Almeida
1c5b78fd21 fix(SlashCommandBuilder): missing methods in subcommand builder (#8583) 2022-09-15 20:19:13 +02:00
Almeida
053da5bc91 types(interactions): pass Cached type to return type of methods (#8619) 2022-09-15 20:18:48 +02:00
RedGuy12
fc9653f5ae docs: fix regexps incorrectly being called global (#8624) 2022-09-15 20:15:01 +02:00
Almeida
22ac6b4660 docs: update misleading Client#guildMemberAvailable event description (#8626) 2022-09-15 20:13:55 +02:00
iCrawl
d14d47b62f chore: dep cleanup 2022-09-12 18:46:15 +02:00
Jiralite
a9f003ac9b types: Ensure events possess Client<true> (#8612)
types: ensure events possess `Client<true>`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-11 18:36:24 +00:00
RedGuy12
1d4cdee321 types(GuildChannelManager): correct fetch return type (#8549)
* types(GuildChannelManager): correct `fetch` return type

* fix(ci): fix the types tests

* fix: fix the docs

* Update packages/discord.js/src/managers/GuildChannelManager.js

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

* types: allow channels in the collection to be null

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

* style: run prettier

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

* test: fix types again

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

* style: run prettier

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>
2022-09-11 18:29:28 +00:00
Jiralite
8e1afaebdb refactor: Split message send/edit types/documentation (#8590)
* refactor: split message send/edit types

* refactor: move `MessageEditOptions`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-11 18:22:53 +00:00
advaith
32523325c6 docs(Options): update DefaultMakeCacheSettings (#8585)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-11 18:16:34 +00:00
iCrawl
7a9e52e63a fix: tiny screen cmdk size 2022-09-09 21:55:35 +02:00
iCrawl
d11edc6397 fix: build script for website 2022-09-09 00:23:42 +02:00
iCrawl
96304d7cc8 feat: command menu 2022-09-09 00:08:59 +02:00
iCrawl
f9e9bfdedc chore: deps 2022-09-09 00:07:56 +02:00
iCrawl
ce1f5c8d47 feat: redirect to old docs for main documentation 2022-09-08 17:05:13 +02:00
advaith
03fb5b0a2f feat(GuildBanManager#create): add deleteMessageSeconds (#8326)
* feat(GuildBanManager#create): add `deleteMessageSeconds`

* Apply suggestions from code review

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

* chore: remove typeof and return undefined if neither are set

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-08 13:15:01 +00:00
RedGuy12
ce991dd1d8 test: rename incorrect test (#8596) 2022-09-08 15:08:28 +02:00
Parbez
dbca93098c chore: remove unused eslint disable comments (#8595) 2022-09-08 15:08:04 +02:00
A. Román
dd5a08944c docs: change name (#8604) 2022-09-08 01:46:41 +02:00
iCrawl
8e98ba94d2 fix: properly center badge text 2022-09-07 22:57:35 +02:00
iCrawl
74dc8c10d5 fix: hide menu on click 2022-09-07 19:19:58 +02:00
iCrawl
8d07ea9a62 fix: dark/light theme fixes 2022-09-07 18:39:02 +02:00
iCrawl
d8e774138d fix: accessibility improvements 2022-09-07 11:29:58 +02:00
Maksi
55c3ee20ae feat: add typeguard to BaseInteraction#isRepliable (#8565)
* feat: add typeguard to BaseInteraction#isRepliable

* fix: redefine RepliableInteraaction

...to exclude impossible interactions rather than specify possible ones

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

* fix: remove InteractionResponseFields

* fix: replace InteractionResponseFields with RepliableInteraction in index test

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-06 17:56:21 +00:00
Noel
c3341570d9 refactor: website components (#8600) 2022-09-06 19:48:33 +02:00
Almeida
f3ce4a75d0 docs: use remarks instead of Note in descriptions (#8597) 2022-09-05 18:14:19 +02:00
iCrawl
4ffdada4f7 chore: deps 2022-09-04 19:33:57 +02:00
Almeida
8b3d006118 feat(Integration): add scopes (#8483) 2022-09-04 08:11:27 +00:00
Almeida
d08a57cadd feat: add chatInputApplicationCommandMention formatter (#8546)
feat: add `chatInputApplicationCommandMention()` formatter

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-03 07:17:06 +00:00
iCrawl
0dc68445a1 refactor: open graph fixes 2022-09-03 05:02:16 +02:00
iCrawl
a7ad7e75ce feat: open graph 2022-09-03 04:48:33 +02:00
Suneet Tipirneni
f79ccb4971 chore(website): bump api-extractor-model (#8584) 2022-09-03 01:14:00 +02:00
iCrawl
6f2b223c8b refactor: extract create model function 2022-09-03 01:01:40 +02:00
iCrawl
a4777aa9b0 feat: add naive client-based search 2022-09-03 00:42:34 +02:00
iCrawl
f072d3d916 feat: redirect to latest version, otherwise click select version button 2022-09-02 22:42:12 +02:00
iCrawl
0238588067 build: fix website build 2022-09-02 22:07:19 +02:00
iCrawl
1d460e0434 chore: deps 2022-09-02 21:48:05 +02:00
RedGuy12
b9c62ac0f0 types(ThreadChannel): fetchStarterMessage must return a Message<true> (#8560)
Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-02 18:44:39 +00:00
iCrawl
df46ab8061 build: tsup for better cjs / esm support 2022-09-02 18:08:16 +02:00
A. Román
b7eb96d456 types(interactions): fix {Slash,ContextMenu}CommandBuilder#toJSON (#8568) 2022-09-02 17:31:25 +02:00
D Trombett
f77612a55e types(webhook): avatar can be null (#8541) 2022-09-02 15:30:06 +00:00
Suneet Tipirneni
9b4116b659 chore(website): put seperators between properties (#8576) 2022-09-02 17:20:57 +02:00
Almeida
8a91d7c256 fix: docgen (#8582) 2022-09-01 22:04:58 +02:00
iCrawl
3b7ba4062e chore: fix leftover eslint exceptions 2022-09-01 21:26:09 +02:00
Suneet Tipirneni
edadb9fe5d refactor: use eslint-config-neon for packages. (#8579)
Co-authored-by: Noel <buechler.noel@outlook.com>
2022-09-01 20:50:16 +02:00
Parbez
4bdb0593ae chore: bump typescript-eslint to support ts 4.8 (#8573) 2022-08-30 22:23:00 +02:00
iCrawl
fd97da9b6c chore: missing config files 2022-08-29 21:48:12 +02:00
Suneet Tipirneni
d5dcddd350 feat: add util package for generating search indices (#8571) 2022-08-29 21:41:51 +02:00
Suneet Tipirneni
40324574eb docs: remove xml tag from collection#find (#8550) 2022-08-29 18:05:30 +02:00
A. Román
1398af66f0 chore(github): resolved typos in issue templates (#8564) 2022-08-29 18:04:37 +02:00
iCrawl
682e0e1802 fix: don't prefetch as links enter viewport 2022-08-26 12:00:25 +02:00
iCrawl
13baf75cae chore: return error 2022-08-24 06:09:39 +02:00
iCrawl
1d6b31b78d fix: revalidate on notFound 2022-08-24 05:42:43 +02:00
iCrawl
5f093dde24 chore: log errors as errors 2022-08-24 05:36:10 +02:00
iCrawl
b58e6a65ad fix: don't throw on not serializable kind 2022-08-24 05:23:03 +02:00
iCrawl
204f4dd7c4 chore: some logging 2022-08-23 22:37:19 +02:00
iCrawl
249ba0a9a6 refactor: contrast & colors 2022-08-23 21:31:38 +02:00
iCrawl
92933c2b61 refactor: memoize everything 2022-08-23 19:39:31 +02:00
iCrawl
abd3fc8ceb fix: properly 404 and revalidate 2022-08-23 18:53:38 +02:00
iCrawl
84059b6b25 fix: affix position when ToC is visible 2022-08-23 17:32:03 +02:00
iCrawl
6da405668f chore: just in case 2022-08-23 17:30:26 +02:00
iCrawl
58d2a1e6d7 chore: deps 2022-08-23 15:17:17 +02:00
iCrawl
7b5c688844 fix: mobile centering 2022-08-23 14:21:48 +02:00
iCrawl
28bc4f42c6 feat: light theme code blocks 2022-08-23 14:00:02 +02:00
iCrawl
5b4672bad3 refactor: css 2022-08-23 13:21:32 +02:00
iCrawl
a57b9ba5c4 refactor: mobile layout for badges 2022-08-23 12:54:40 +02:00
iCrawl
32da9b3868 fix: footer and sidebar mobile spacing 2022-08-23 12:06:18 +02:00
iCrawl
70806b401e style: type import 2022-08-23 12:01:48 +02:00
iCrawl
0674820723 style: spacing 2022-08-23 11:20:08 +02:00
iCrawl
2d5bce274c fix: footer on mobile 2022-08-23 11:13:39 +02:00
iCrawl
331dedcb9d refactor: front page 2022-08-23 10:57:34 +02:00
iCrawl
103e1bd843 feat: add footer links 2022-08-23 10:11:07 +02:00
iCrawl
ffafde0b6b refactor: make dark theme the default 2022-08-23 09:36:19 +02:00
iCrawl
28422eea58 fix: spacing of footer and affix 2022-08-23 09:15:33 +02:00
iCrawl
c826ad3ade feat: markdown syntax highlighting 2022-08-23 08:48:44 +02:00
iCrawl
17559becef refactor: change radius 2022-08-23 08:18:36 +02:00
iCrawl
b31a23b37c build: "no default export" 2022-08-23 08:01:09 +02:00
iCrawl
8e4f77a63b build: use module 2022-08-23 07:55:41 +02:00
iCrawl
b16ab8c69f fix: check if router is ready before using its path 2022-08-23 07:07:22 +02:00
iCrawl
cf8570c19c style: spacing on mobile 2022-08-23 07:05:48 +02:00
iCrawl
f0ab393411 fix: use correct icon on version select 2022-08-23 05:22:18 +02:00
iCrawl
11e02f1e5d refactor: include item kind into url 2022-08-23 05:13:53 +02:00
iCrawl
206523587a refactor: split out package constant 2022-08-23 04:20:41 +02:00
iCrawl
ac3bc6a2db style: spacing 2022-08-23 04:11:12 +02:00
iCrawl
af295acedc fix: wrong active item after anchor select 2022-08-23 03:59:53 +02:00
iCrawl
caa5c0332f feat: add anchor icon 2022-08-23 03:06:21 +02:00
iCrawl
434f696397 refactor: reset state and code cleanup 2022-08-23 02:38:53 +02:00
iCrawl
6062d361fb feat: more fallback cases 2022-08-23 02:13:10 +02:00
iCrawl
2ecb862e76 feat: use fallback with loading 2022-08-23 01:43:10 +02:00
iCrawl
360936140b fix: don't persist state between pages 2022-08-23 01:26:57 +02:00
iCrawl
0b56184ba7 fix: github link and light theme hover nav link 2022-08-23 01:21:28 +02:00
iCrawl
a55545850a refactor: better spacing 2022-08-23 01:02:46 +02:00
iCrawl
f16b11a91d feat: active navigation and back button 2022-08-23 00:44:09 +02:00
iCrawl
0fb2694871 refactor: switch to ssr for unbuilt pages 2022-08-23 00:13:04 +02:00
iCrawl
ee030003ec fix: markdown images and links 2022-08-22 23:58:49 +02:00
iCrawl
29c51be1f4 feat: custom 404 2022-08-22 23:58:33 +02:00
iCrawl
43a78be70b fix: return 404 if a fetch error or no data is returned 2022-08-22 23:29:23 +02:00
iCrawl
92c0c60519 feat: version picker 2022-08-22 23:08:23 +02:00
iCrawl
ba3e0ed348 fix: footer / sidebar / deprecation alert 2022-08-22 22:15:50 +02:00
iCrawl
f7ce9f8533 feat: footer 2022-08-22 21:52:17 +02:00
iCrawl
00990c93ae chore: missing vercel banner 2022-08-22 21:06:34 +02:00
iCrawl
c076b0d8cb fix: don't redirect to the first item 2022-08-22 21:02:15 +02:00
iCrawl
d297fb0b69 feat: readme if no member is selected 2022-08-22 20:51:43 +02:00
iCrawl
24c128d649 feat: experiment with spotlight 2022-08-22 19:44:56 +02:00
iCrawl
ec7c6e3d3e fix: selecting packages on the sidebar 2022-08-22 18:38:07 +02:00
iCrawl
6dfb9bbc48 feat: generate all tags 2022-08-22 18:30:46 +02:00
Suneet Tipirneni
4644e45e85 fix(website): use inter font for titles (#8542)
Co-authored-by: Noel <buechler.noel@outlook.com>
2022-08-22 18:29:26 +02:00
iCrawl
1e001601c8 refactor: change url scheme 2022-08-22 16:50:43 +02:00
iCrawl
1aec243b1d feat: packages route 2022-08-22 16:01:42 +02:00
iCrawl
191951ac28 feat: add ToC to interfaces 2022-08-22 15:38:47 +02:00
iCrawl
4fb4492b17 refactor: icons and head 2022-08-22 15:34:21 +02:00
iCrawl
abb968de81 feat: favicon 2022-08-22 14:57:51 +02:00
iCrawl
d9e53093f5 fix: properly check for properties and methods 2022-08-22 14:32:59 +02:00
iCrawl
e5678f4656 feat: list properties and method in table of content 2022-08-22 14:30:15 +02:00
iCrawl
9f18036078 fix: hydration error 2022-08-22 14:29:31 +02:00
iCrawl
474eae0afc style: change how optionals are displayed 2022-08-22 14:19:02 +02:00
iCrawl
caeb66e150 fix: overflowing content 2022-08-22 14:12:53 +02:00
iCrawl
7623fc552e ci: don't double check inputs 2022-08-22 12:11:45 +02:00
iCrawl
230c43e97d build: fix downlevel-dts 2022-08-22 11:29:57 +02:00
iCrawl
4e3fa586b5 chore(discord.js): release discord.js@14.3.0 2022-08-22 10:56:30 +02:00
Jiralite
6bb1474d20 types: Inference of guild in MessageManager (#8538)
* types: better inference of message manager

* types: alter helper methods

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-22 08:31:02 +00:00
iCrawl
27bbc8fe68 chore(builders): release @discordjs/builders@1.2.0 2022-08-22 10:10:19 +02:00
iCrawl
e2cde5daa0 chore(collection): release @discordjs/collection@1.1.0 2022-08-22 10:08:38 +02:00
iCrawl
0960457108 chore: update proxy and rest in proxy-container 2022-08-22 10:07:22 +02:00
iCrawl
cd6b365b17 chore: changelog 2022-08-22 10:06:49 +02:00
iCrawl
19e1f5d0ca chore(proxy): release @discordjs/proxy@1.1.0 2022-08-22 10:04:03 +02:00
iCrawl
3621e5efbd chore(rest): release @discordjs/rest@1.1.0 2022-08-22 10:01:34 +02:00
iCrawl
d2f5b5b539 chore(ws): release @discordjs/ws@0.3.0 2022-08-22 09:57:26 +02:00
iCrawl
9ed11a4c19 chore: deps 2022-08-22 09:56:42 +02:00
Suneet Tipirneni
e42fd16369 feat(website): Show constructor information (#8540) 2022-08-22 09:45:53 +02:00
Jiralite
dd44e8b6ec fix(proxyRequests): Typo in error message (#8537)
fix(proxyRequests): typo in error message

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-21 20:39:40 +00:00
Synbulat Biishev
3bef9018c0 fix(GuildMemberManager): add() method throws an error (#8539)
* fix(GuildMemberManager): `add()` method throws an error

* chore: update comment
2022-08-21 20:32:56 +00:00
Jiralite
23a0b6ccf2 fix(Guild): Widget channel types and fixes (#8530)
fix: various widget fixes

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-21 09:28:31 +00:00
Jiralite
b3f7c32f7f types: Allow choice's value type to be strictly inferred (#8529)
* types: stricter types for choices in options

* test: add choice tests

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-20 20:29:16 +00:00
Jiralite
0dba8adbd2 types(GuildAuditLogs): Allow fetching to return all possible values (#8522)
types: allow everything to be returned upon fetching

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-20 19:03:36 +00:00
Jiralite
2b8074dd12 refactor(GuildAuditLogsEntry): Remove guild from application command permission update extra (#8520)
refactor(GuildAuditLogsEntry): remove guild extra

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-20 18:51:39 +00:00
InkoHX
16bbc8aa20 types: Correct EventEmitter.on (static) return type (#8524)
types: Correct EventEmitter.on (static) return type

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-20 18:45:56 +00:00
Jiralite
7a3d18dd6d types(GuildAuditLogs): Remove static Entry (#8521)
types(GuildAuditLogs): remove static `Entry`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-20 18:34:32 +00:00
Jiralite
4882b17a77 types: Disallow some channel types from webhook creation (#8531)
types: disallow some channel types from webhook creation
2022-08-20 18:26:33 +00:00
Suneet Tipirneni
8028813825 feat(website): render @defaultValue blocks (#8527)
feat(website): render @defaultValue blocks
2022-08-19 18:24:55 +02:00
Suneet Tipirneni
47f2990b89 feat(website): show inherited members (#8526)
* feat(website): show inherited members

* fix: use passHref
2022-08-19 18:22:22 +02:00
Suneet Tipirneni
e475b63f25 feat(website): show descriptions for @typeParam blocks (#8523) 2022-08-19 10:55:43 +02:00
iCrawl
673262d38c feat: deprecation badges 2022-08-18 18:47:44 +02:00
Suneet Tipirneni
7f415a2502 feat(website): show parameter descriptions (#8519)
Co-authored-by: Noel <buechler.noel@outlook.com>
2022-08-18 18:38:27 +02:00
DD
cda3f005b1 feat(GuildMemberManager): addRole and removeRole (#8510)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-18 10:58:35 +02:00
Synbulat Biishev
f9c25ddcfe feat: deprecate ActionRow.from() (#8504)
* feat: deprecate `ActionRow.from()`

* feat: deprecate `ActionRow.from()`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-18 07:06:01 +00:00
iCrawl
74740260a7 ci: fix if statement, again 2022-08-17 23:51:07 +02:00
iCrawl
1008e3d4a7 ci: fix if check 2022-08-17 23:46:22 +02:00
iCrawl
17ab0e652c refactor: inline table of contents 2022-08-17 23:21:23 +02:00
Noel
872ce801a0 revert: "refactor(website): use mantine code blocks" (#8514) 2022-08-17 23:04:47 +02:00
Suneet Tipirneni
0bf3df30da refactor(website): use mantine code blocks (#8512) 2022-08-17 22:38:11 +02:00
iCrawl
20680efbc9 feat: more visibly annotate optionals 2022-08-17 22:16:22 +02:00
Jiralite
7701331b1c ci: Remove management of chore label (#8508)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-17 20:12:54 +00:00
Suneet Tipirneni
0be85fd101 feat(website): render @deprecated and @remarks blocks (#8511) 2022-08-17 21:51:29 +02:00
iCrawl
e147c5bd64 fix: codelisting 2022-08-17 21:24:38 +02:00
iCrawl
2f1ec7401c feat: table of contents / method visibility / property modifiers 2022-08-17 21:12:09 +02:00
Suneet Tipirneni
0f83402985 refactor(website): adjust typography (#8503) 2022-08-17 10:17:09 +02:00
Parbez
d97cd936fd chore: bump vitest and add @vitest/coverage-c8 (#8507) 2022-08-17 09:44:21 +02:00
Jiralite
812f7f1ea8 types: Implement max/min values for autocomplete (#8498)
* types: implement max/min values for autocomplete

* refactor: deduplicate options

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-16 20:37:08 +00:00
Jiralite
7d2507279c docs(GuildAuditLogsEntry): Correct action wording (#8499)
docs(GuildAuditLogsEntry): fix `action` wording

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-16 20:30:07 +00:00
Rodry
c31a5cfcc8 types(ModalMessageModalSubmitInteraction): channelId is not nullable (#8496)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-16 15:38:30 +00:00
DD
acdafe60c7 fix(WebSocketShard#destroy): wait for close and cleanup listeners (#8479)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-16 15:33:00 +00:00
DD
4fd42528fe fix(WebSocketManager#connect): check if we have enough sessions (#8481)
* fix(WebSocketManager#connect): check if we have enough sessions

* fix: more useful error message

* fix: tests

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-16 15:28:01 +00:00
ZyX
ebaf158006 types: change type of ApplicationCommandSubCommand.options (#8476)
* types: change type of ApplicationCommandSubCommand.options

* types: change type of ApplicationCommandSubCommand.options

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

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

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2022-08-16 14:39:16 +00:00
Suneet Tipirneni
7116647947 feat(website): render tsdoc examples (#8494) 2022-08-16 16:33:49 +02:00
iCrawl
c99b808882 ci: fix workflow 2022-08-16 16:24:07 +02:00
iCrawl
a1dddd6b2c build: only build web on vercel 2022-08-16 16:07:08 +02:00
iCrawl
b3db9eef32 build: force a docs rebuild 2022-08-16 15:51:51 +02:00
iCrawl
501945215b ci: use concurrency 2022-08-16 11:00:17 +02:00
iCrawl
e82b2e49f5 fix: use correct env file 2022-08-15 19:17:41 +02:00
iCrawl
5f42b5af30 feat: fetch from local when developing or CI build 2022-08-15 19:13:01 +02:00
iCrawl
35e79b389d fix: correctly handle overflowing content 2022-08-15 18:35:34 +02:00
iCrawl
5dc7946df2 fix: properly render critical styles on the server 2022-08-15 18:23:10 +02:00
iCrawl
1e00f5789e chore: enable kodiak for auto merges 2022-08-15 16:56:30 +02:00
iCrawl
85cb0f25c7 build: run build with concurrency but everything else parallel 2022-08-15 16:16:12 +02:00
iCrawl
3cc893a282 build: enable parallel building for turbo 2022-08-15 16:12:45 +02:00
Marcus Otterström
fc99bf431a Specify time unit in awaitModalSubmit (#8484) 2022-08-15 16:07:03 +02:00
Noel
4ab1d09997 refactor: docs design (#8487) 2022-08-15 14:48:00 +02:00
iCrawl
d09ef1e425 build: switch back to turbo for speedz 2022-08-15 14:19:17 +02:00
iCrawl
d56590a11d chore: use external collection for docgen 2022-08-15 13:50:41 +02:00
iCrawl
c052f56f3e ci: fix typechecking in ci 2022-08-15 00:42:33 +02:00
iCrawl
cb856860b7 ci: install dev deps everywhere 2022-08-14 21:30:55 +02:00
iCrawl
4cf265c7c6 ci: exclude shared match 2022-08-14 21:21:17 +02:00
iCrawl
3ec7ef07a0 ci: correctly reference job 2022-08-14 21:17:12 +02:00
iCrawl
90e7aea443 ci: check for shared additionally to packages 2022-08-14 21:04:51 +02:00
iCrawl
1211c7fc10 ci: fix dependency 2022-08-14 20:12:58 +02:00
iCrawl
84a4b1f58a ci: only test run affected packages 2022-08-14 20:12:02 +02:00
iCrawl
193b252672 docs: fence examples in codeblocks 2022-08-14 19:25:25 +02:00
DD
bc06cc638d feat(WebSocketShard): support new resume url (#8480) 2022-08-14 12:01:35 +02:00
iCrawl
d08da8a212 refactor: properly handling spacing 2022-08-13 20:42:03 +02:00
iCrawl
5360099e5f build: don't build website on ci, let vercel handle it on changes 2022-08-13 20:14:28 +02:00
Suneet Tipirneni
fd4844ddb9 feat(website): add support for function overloads (#8474)
Co-authored-by: Noel <buechler.noel@outlook.com>
2022-08-13 20:14:23 +02:00
iCrawl
8e69efde04 feat(website): breadcrumbs layout 2022-08-12 17:04:12 +02:00
iCrawl
2447165c82 fix(website): accessibility 2022-08-12 17:03:04 +02:00
Jiralite
c97977a3e8 fix(Embed): Reference video in video (#8473) 2022-08-12 05:09:44 +02:00
iCrawl
7666a6c341 chore: update changelog 2022-08-10 20:56:22 +02:00
iCrawl
9d8966fe24 chore(discord.js): release discord.js@14.2.0 2022-08-10 20:50:57 +02:00
iCrawl
4d128acac5 chore: deps 2022-08-10 20:37:25 +02:00
iCrawl
831d6506cb chore: update changelog 2022-08-10 20:26:45 +02:00
RedGuy12
c5b96a185c types(Message): correct bulkDelete return type (#8465)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Noel <buechler.noel@outlook.com>
2022-08-10 20:25:12 +02:00
Jiralite
afa27b15c5 fix(ThreadChannel): Handle possibly null parent (#8466) 2022-08-10 20:16:57 +02:00
iCrawl
4d7283933d chore: update changelog 2022-08-10 19:44:23 +02:00
Jan Parisek
452e94fd3e types: fix missing types for mentionable options (#8443)
Co-authored-by: A. Román <kyradiscord@gmail.com>
Co-authored-by: Noel <buechler.noel@outlook.com>
2022-08-10 18:33:52 +02:00
Jiralite
6c6fe74dd8 fix: Remove DM channels from Client#messageDeleteBulk's types (#8460) 2022-08-10 18:29:46 +02:00
A. Román
0e2a09571c fix(Transformers): do not transform Date objects (#8463) 2022-08-10 18:28:35 +02:00
Ryan Munro
0fab869e51 fix(ModalSubmitInteraction): allow deferUpdate (#8455) 2022-08-10 18:25:56 +02:00
advaith
64a4041a05 docs: change registration example to use global commands (#8454) 2022-08-10 18:25:31 +02:00
Jan Parisek
38275fc53d types(ApplicationCommandOption): add ApplicationCommandBooleanOption (#8434) 2022-08-10 18:24:50 +02:00
n1ck_pro
aac8acc22b fix(Guild): unable to fetch templates (#8420) 2022-08-08 11:11:10 +02:00
Ryan Munro
6ef4754d40 docs(Colors): provide enum descriptions (#8437) 2022-08-08 11:10:43 +02:00
Almeida
b8a31360a2 fix(MessageMentions): infinite loop in parsedUsers getter (#8430) 2022-08-08 11:10:32 +02:00
RedGuy12
5b053cf82e docs(AttachmentBuilder): fix #8407 (#8421)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2022-08-08 11:06:11 +02:00
Synbulat Biishev
e72b986939 fix(DataResolver): make Buffer from string (#8416) 2022-08-08 11:05:56 +02:00
Jiralite
3a96ce7970 feat(Guild): Add max_video_channel_users (#8423) 2022-08-08 11:05:40 +02:00
SpaceEEC
359f688555 fix(WebSocketShard): always reconnect on disconnected with 1000 (#8405) 2022-08-01 13:24:25 +02:00
SpaceEEC
3161e1a1ac fix(WebSocketShard): emit errors directly instead of objects (#8406) 2022-08-01 13:24:09 +02:00
iCrawl
4d8361c711 build: fix building actions 2022-07-30 22:02:02 +02:00
iCrawl
d6e4d149fd chore(discord.js): release discord.js@14.1.2 2022-07-30 21:00:09 +02:00
DD
480c85c9c3 fix(errors): error codes (#8398) 2022-07-30 20:49:59 +02:00
iCrawl
b45b99f92b chore(ws): release @discordjs/ws@0.2.0 2022-07-30 20:42:46 +02:00
DD
5137bfc17d fix(WebSocketShard): account code 1000 with no prior indication (#8399) 2022-07-30 20:37:46 +02:00
Jiralite
fca3dada2a docs(Embed): Ensure height and width are numbers (#8396) 2022-07-30 11:39:15 +02:00
Parbez
d070de6da7 chore: fix file path (#8391)
* chore: fix file path

* chore: emit only mjs
2022-07-29 18:43:57 +02:00
iCrawl
a3183cfad4 chore(discord.js): release discord.js@14.1.1 2022-07-29 13:47:21 +02:00
iCrawl
aba307341d chore(builders): release @discordjs/builders@1.1.0 2022-07-29 13:42:55 +02:00
Parbez
c479d39a6b chore: build only actions (#8383) 2022-07-29 11:19:54 +02:00
Parbez
52c2818b25 feat(website): add implements for class (#8388)
Co-authored-by: Noel <buechler.noel@outlook.com>
2022-07-29 11:19:32 +02:00
iCrawl
d03cf6176c chore(discord.js): release discord.js@14.1.0 2022-07-29 11:04:08 +02:00
iCrawl
11e77f7f86 chore: deps 2022-07-29 11:00:45 +02:00
iCrawl
2b1e88b5fa chore: update changelog 2022-07-29 10:59:35 +02:00
Synbulat Biishev
e5bfe2c7c2 chore: reexport rest (#8372) 2022-07-29 10:47:30 +02:00
Jiralite
a7deb8f898 feat: Add channel & message URL formatters (#8371) 2022-07-29 10:47:23 +02:00
Almeida
b4e2c0c4d5 fix(MessageMentions): ignoreRepliedUser option in has() (#8202) 2022-07-29 10:47:05 +02:00
Suneet Tipirneni
33113614e0 feat(website): parse tsdoc comments (#8386) 2022-07-29 10:46:17 +02:00
Suneet Tipirneni
26556390a3 fix: use proper format for @link text (#8384)
fix(collection): use proper format for link text
2022-07-28 20:24:07 +02:00
Parbez
5494791313 docs: use link tags (#8382) 2022-07-28 19:18:42 +02:00
Parbez
c258bdf083 chore: cleanup tsup configs (#8381) 2022-07-28 18:57:57 +02:00
Parbez
ff5dd1fcb4 docs: hide sections with no members (#8380) 2022-07-28 17:55:46 +02:00
iCrawl
a38c58dbd0 feat: tertiary sidebar 2022-07-28 17:46:41 +02:00
Suneet Tipirneni
ec43c184fe feat(website): add icons for sections (#8377)
* feat(website): add icons for sections

* chore: make requested changes

* fix: add icon for function parameters
2022-07-28 16:26:06 +02:00
iCrawl
c25e8ad78b chore: use date order instead of topological for changelog 2022-07-27 14:36:09 +02:00
iCrawl
3f17ff23bf chore: fix changelog 2022-07-27 14:22:13 +02:00
iCrawl
a7dc588d9f chore(proxy): release @discordjs/proxy@1.0.1 2022-07-27 14:16:56 +02:00
iCrawl
2291429d30 chore(ws): release @discordjs/ws@0.1.0 2022-07-27 14:15:59 +02:00
iCrawl
bf7326729d chore(rest): release @discordjs/rest@1.0.1 2022-07-27 14:12:23 +02:00
iCrawl
124d8123b8 chore(collection): release @discordjs/collection@1.0.1 2022-07-27 14:10:17 +02:00
Jiralite
0b61dbf720 docs(InteractionResponses): Add showModal() return type (#8376) 2022-07-27 13:59:26 +02:00
Jiralite
ba6797e742 docs(WebhookClient): Document working options (#8375) 2022-07-27 13:05:47 +02:00
Jiralite
7fd9ed8f13 refactor: Deprecate Formatter class (#8373) 2022-07-27 13:05:31 +02:00
iCrawl
b6bba9901b chore: deps 2022-07-27 12:23:07 +02:00
Jiralite
2130aae321 docs(Message): Document gateway intent for content (#8364) 2022-07-27 12:10:05 +02:00
Jiralite
80b9738957 docs: Use info blocks for requirements (#8361) 2022-07-27 12:09:50 +02:00
A. Román
5d8bd030d6 fix(Formatters): add newline in codeBlock (#8369) 2022-07-27 12:09:34 +02:00
Jiralite
e9920a9c98 docs(WebhookClient): Make constructor a union (#8370)
Co-authored-by: muchnameless <12682826+muchnameless@users.noreply.github.com>
2022-07-27 12:09:18 +02:00
Jiralite
6d248051cf refactor(PermissionOverwriteManager): Use OverwriteType (#8374) 2022-07-27 12:06:59 +02:00
iCrawl
798466a696 fix: various css for the sidebar 2022-07-26 09:48:40 +02:00
Suneet Tipirneni
1275918ca8 feat(website): group items by symbol kind (#8360)
* feat(website): group items by symbol kind

* chore: make requested changes

* chore: fix darkmode colors

* chore: make requested changes

* Update packages/website/src/components/ListSidebar.tsx

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

Co-authored-by: Almeida <almeidx@pm.me>
2022-07-26 09:30:57 +02:00
SpaceEEC
a7d49e56fc fix(GuildChannelManager): allow unsetting rtcRegion (#8359) 2022-07-26 09:29:30 +02:00
Ryan Munro
34ba9d1c4c docs: update docs and examples to PascalCase links (#8305)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2022-07-25 11:13:09 +02:00
Ryan Munro
77ed407f6a feat: restore missing typeguards (#8328) 2022-07-25 11:12:48 +02:00
Rodry
4fc2c60a3b feat(GuildMember): add dmChannel getter (#8281) 2022-07-25 11:12:00 +02:00
Jiralite
9f4446b10f chore: Update update guide link (#8358)
chore: update update guide
2022-07-25 11:09:58 +02:00
Jiralite
78d4295a40 fix(WebSocketShard): Use correct import (#8357) 2022-07-25 11:09:27 +02:00
iCrawl
5a3c9996e0 fix(enums): dark theme colors 2022-07-25 01:38:17 +02:00
iCrawl
4fff6076e7 refactor: cleanup css 2022-07-25 00:55:40 +02:00
Suneet Tipirneni
4bda24678a refactor(website): add typography improvements (#8355)
* refactor(website): add typography improvements

* chore: bold on hover
2022-07-24 21:56:50 +02:00
iCrawl
9ae461d84d chore: rename docker publish 2022-07-24 18:51:26 +02:00
iCrawl
160487d866 chore: fix dockerbuild and add ws props everywhere 2022-07-24 18:49:06 +02:00
iCrawl
41e4e10b48 fix(Layout): refactor to sidebar layout component 2022-07-24 18:28:32 +02:00
Jiralite
200ab91f52 types(GuildAuditLogsEntryExtraField): Use AuditLogOptionsType (#8349) 2022-07-24 17:26:55 +02:00
Jiralite
3839958e3f fix(ThreadChannel): Omit webhook fetching (#8351) 2022-07-24 17:18:08 +02:00
thehairy
58c1b51c5c fix(GuildAuditLogsEntry): replace OverwriteType with AuditLogOptionsType (#8345) 2022-07-24 16:15:51 +02:00
Suneet Tipirneni
6a2d0d8e96 fix(selectMenu): allow json to be used for select menu options (#8322) 2022-07-24 15:14:33 +02:00
Suneet Tipirneni
335695c698 refactor: use next links (#8344)
* chore(website): use next links

* chore: fix deploy check

* chore: use ligher syntax highlighter
2022-07-24 15:14:18 +02:00
DD
8e520f946a fix(ShardClientUtil#_respond): construct global error (#8348) 2022-07-24 15:13:13 +02:00
Jiralite
59a7e52224 fix: Ensure returns for function type definitions (#8346) 2022-07-24 13:44:46 +02:00
Jiralite
af837debe3 chore: Use raw GitHub link to show Vercel logo on website (#8343)
chore: use raw GitHub link to show on docs
2022-07-23 23:38:49 +02:00
Jiralite
df42fdfc42 fix(Presence): Do not return NaN for activity timestamp (#8340) 2022-07-23 18:21:47 +02:00
iCrawl
5f667c0c82 fix: correctly configure middleware 2022-07-23 04:13:16 +02:00
iCrawl
90cbd2bbd5 fix: move middleware into source directory
This needs to be on the same level as the pages directory, sometimes the documentation mentioned "root", but that obviously is not true if you use a src directory
2022-07-23 02:49:24 +02:00
iCrawl
f50382e1ce feat: add middleware for path rewriting 2022-07-23 02:35:21 +02:00
iCrawl
1b03631205 chore: patch all versions of tsdoc-config 2022-07-23 01:57:47 +02:00
iCrawl
a490adfe36 chore: remove hoist and install normally 2022-07-23 01:41:12 +02:00
iCrawl
f097f0bc1f chore: create patch for tsdoc-config 2022-07-23 01:38:21 +02:00
iCrawl
1d63d3ce1c build: explicitly add deps 2022-07-23 01:24:45 +02:00
iCrawl
6d25fb8856 fix(yarn): don't hoist packages for website 2022-07-23 00:36:00 +02:00
iCrawl
86a9be7d33 fix(IRS): also generate index routes 2022-07-23 00:11:19 +02:00
iCrawl
82165d4f80 feat(IRS): next IRS 2022-07-22 23:39:48 +02:00
iCrawl
ee455c812e refactor: switch to next.js 2022-07-22 21:47:06 +02:00
iCrawl
0d687b5606 chore: deps 2022-07-22 19:25:24 +02:00
DD
748d7271c4 feat: @discordjs/ws (#8260)
Co-authored-by: Parbez <imranbarbhuiya.fsd@gmail.com>
2022-07-22 19:13:47 +02:00
SpaceEEC
830c670c61 fix(Client): omit private properties from toJSON (#8337) 2022-07-22 17:11:54 +02:00
iCrawl
74ec7be346 chore: add lint-staged 2022-07-22 01:32:19 +02:00
iCrawl
96b62b6539 ci: rename files to match better naming 2022-07-20 22:33:23 +02:00
iCrawl
8a6ee906a7 ci: better naming for ci 2022-07-20 20:24:09 +02:00
Almeida
1fb7b30963 fix(ApplicationCommandManager): allow passing 0n to defaultMemberPermissions (#8311)
* fix(ApplicationCommandManager): allow passing 0n to defaultMemberPermissions

* fix(ApplicationCommand): equals()
2022-07-20 20:12:58 +02:00
iCrawl
45c9659080 ci: fix vercel deploy check 2022-07-20 19:03:48 +02:00
iCrawl
07a5cd7048 ci: check deploy branch vercel 2022-07-20 18:49:24 +02:00
iCrawl
d0e3c972b4 chore: reorder release steps 2022-07-20 18:44:44 +02:00
iCrawl
a05386a46c ci: fix docs and dev publishes 2022-07-20 17:22:57 +02:00
Noel
3b0197bd8e build: refactor build system (#8324) 2022-07-20 16:36:42 +02:00
iCrawl
d1245418f9 chore: add license to root 2022-07-19 20:11:23 +02:00
iCrawl
e7d4d41640 chore: use full link for vercel banner in readmes 2022-07-19 19:43:14 +02:00
iCrawl
ce1807dc80 fix(landing): vercel banner not wrapped in a tag 2022-07-19 19:41:14 +02:00
iCrawl
34d3917a28 chore: spacing on vercel logo 2022-07-19 19:38:11 +02:00
iCrawl
9e624abf1a chore(discord.js): release discord.js 2022-07-19 18:40:01 +02:00
iCrawl
8c4b9865e1 fix(landing): vercel banner 2022-07-19 18:33:50 +02:00
iCrawl
dbad1c468b chore: fix root vercel banner 2022-07-19 18:29:41 +02:00
iCrawl
4ffd7f9f80 chore: vercel banner 2022-07-19 18:26:03 +02:00
advaith
660e212e83 fix(Components): support emoji id strings (#8310) 2022-07-19 14:56:21 +02:00
iCrawl
70dd757ec3 refactor(theme): switch theme detection to use class 2022-07-18 19:53:07 +02:00
Suneet Tipirneni
b5d4b2d78b feat(website): add basic landing page (#8313)
Co-authored-by: Noel <buechler.noel@outlook.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2022-07-18 19:11:18 +02:00
iCrawl
78d013f87c ci: fix building before linting/testing 2022-07-18 14:20:11 +02:00
iCrawl
21d61ca260 chore: remove parallel execution 2022-07-18 14:09:45 +02:00
iCrawl
b316ac7cc4 ci: remove turbo cache 2022-07-18 13:16:16 +02:00
iCrawl
ed94b3d9ec chore: change versions 2022-07-18 12:52:15 +02:00
iCrawl
dcbbecfed2 chore: dev version 2022-07-18 12:28:39 +02:00
iCrawl
0c5e37d515 chore(discord.js): release discord.js 2022-07-18 12:26:49 +02:00
iCrawl
656e9550db fix: default package to discord.js 2022-07-18 12:21:48 +02:00
DD
3a7e93df57 fix(DataResolver#resolveImage): adjust to updated resolveFile (#8308) 2022-07-18 12:17:46 +02:00
iCrawl
66092cad8b feat(theme): dark theme detection 2022-07-18 02:57:29 +02:00
iCrawl
ec230faa4d feat(theme): better dark theme 2022-07-18 02:35:34 +02:00
iCrawl
cd13a4a902 fix(sidebar): styling issues 2022-07-18 02:14:38 +02:00
iCrawl
dda2895bfb chore: release bump 2022-07-17 22:37:01 +02:00
iCrawl
f0b77348d3 chore: bump dev version 2022-07-17 22:18:45 +02:00
iCrawl
b0a9131b1c chore(discord.js): release discord.js 2022-07-17 22:15:00 +02:00
iCrawl
29be5b570b chore: deps 2022-07-17 22:06:54 +02:00
iCrawl
d677c31161 chore: update dev versions 2022-07-17 22:05:32 +02:00
iCrawl
f6ef92ad6a chore: release @discordjs/builders, @discordjs/collection, @discordjs/proxy, @discordjs/rest 2022-07-17 22:02:32 +02:00
Jiralite
52a9e213c2 fix(GuildMemberManager): Allow setting own nickname (#8066) 2022-07-17 21:47:02 +02:00
Almeida
b7e62380f2 test(builders): improve coverage (#8274) 2022-07-17 21:20:26 +02:00
Lo
cafde77d73 refactor(Util)!: rename fetchRecommendedShards (#8298) 2022-07-17 21:17:49 +02:00
Rodry
b7d4e55419 types(GuildFeature): allow feature strings to be passed (#8264)
Co-authored-by: Synbulat Biishev <syjalo.dev@gmail.com>
2022-07-17 21:14:54 +02:00
Almeida
5aeed99350 docs: align webhook method return types with implementation (#8253) 2022-07-17 21:14:25 +02:00
Jiralite
452dec57ca docs: Remove @private constructor documentation (#8255) 2022-07-17 21:13:54 +02:00
Jiralite
64f814066c refactor(Embed): Add all the types (#8254) 2022-07-17 21:13:40 +02:00
Rodry
33a7a5cbdc types(CategoryChannelChildManager): fix Holds type (#8288) 2022-07-17 21:12:22 +02:00
iCrawl
edf83f02ea chore: bump dev versions 2022-07-17 21:05:21 +02:00
iCrawl
25bd771559 chore(voice): release @discordjs/voice@0.11.0 2022-07-17 21:04:18 +02:00
iCrawl
f2ca0ca6f9 chore(rest): release @discordjs/rest@0.6.0 2022-07-17 21:03:35 +02:00
iCrawl
6712de9752 chore(collection): release @discordjs/collection@0.8.0 2022-07-17 20:59:54 +02:00
iCrawl
28cd293f14 chore: update changelog 2022-07-17 19:42:10 +02:00
iCrawl
3f5690afe1 chore(builders): bump dev version 2022-07-17 19:31:32 +02:00
iCrawl
015ab69956 chore(builders): release @discordjs/builders@0.16.0 2022-07-17 19:28:12 +02:00
iCrawl
caecc574f0 chore: deps 2022-07-17 19:20:40 +02:00
BattleEye
3bf30b1e6d fix(PermissionOverwriteManager): mutates user (#8283) 2022-07-17 18:59:10 +02:00
DD
103a3584c9 refactor(rest): add content-type(s) to uploads (#8290) 2022-07-17 18:55:25 +02:00
Almeida
bf65b37d1a types: remove MemberMention (#8292) 2022-07-17 18:54:44 +02:00
Parbez
7e6dbaaed9 types: remove expect error (#8242) 2022-07-17 18:53:40 +02:00
CallMe AsYouFeel
1a6ddbbe7b fix(VoiceReceiver): parsePacket correctly (#8277) 2022-07-17 18:52:35 +02:00
Tiemen
32f9056b15 fix: slash command name regex (#8265) 2022-07-17 18:52:18 +02:00
Jiralite
3648f6d567 fix(GuildChannelManager): Access resolveId correctly (#8296) 2022-07-17 18:51:25 +02:00
Almeida
bddb6a461c chore: ignore index files in coverage (#8293)
Co-authored-by: ckohen <chaikohen@gmail.com>
2022-07-17 18:51:03 +02:00
Jiralite
fe34f48efb chore: Remove --cache (#8279) 2022-07-13 16:58:40 +02:00
Jeroen Claassens
30a8d3231f chore: update Git Cliff TOMLs (#8276) 2022-07-13 09:49:17 +02:00
Suneet Tipirneni
1ed605eaa4 feat(website): add extends clauses, enum members and automatic -types links (#8270)
* feat(website): add extends clauses, enum members and automatic -types links

* chore: remove vscode settings

* refactor: remove util file
2022-07-12 22:42:32 +02:00
muchnameless
787654816d fix(GuildChannelManager): edit lockPermissions (#8269) 2022-07-12 22:34:14 +02:00
Eejit
f0b68d5736 refactor: make GuildAuditLogsEntry.action return an AuditLogEvent (#8256) 2022-07-09 19:55:24 +02:00
Jiralite
75256153a9 types(GuildMemberManager): Fix placement for fetchMe() (#8258) 2022-07-09 19:43:02 +02:00
Suneet Tipirneni
33ae7df000 feat(website): add detailed property and method documentation (#8252)
Co-authored-by: Noel <buechler.noel@outlook.com>
2022-07-08 22:03:18 +02:00
Tyler Resch
feb3bdda0a types: convert Events to an enum (#8246) 2022-07-08 16:02:48 +02:00
Suneet Tipirneni
e78c9c9ee9 feat(website): show package members in a sidebar (#8245)
* feat(website): show package members in a sidebar

* fix: put response instead of loader

* Apply suggestions from code review

Co-authored-by: Noel <buechler.noel@outlook.com>

* chore: make requested changes

* refactor: make only package list scrollable

* feat: make sidebar mobile responsive

* fix: breakpoints for sidebar

Co-authored-by: Noel <buechler.noel@outlook.com>
2022-07-07 22:09:19 +02:00
MateoDeveloper
43f62bb667 docs(ApplicationCommand): add min_length and max_length to ApplicationCommandOptionData (#8239) 2022-07-07 20:46:06 +02:00
Parbez
96c8d21f95 feat(builder): add max min length in string option (#8214) 2022-07-07 20:45:32 +02:00
Anton Istomin
10ba0080cc fix(recorder-example): bump dependencies (#8123) 2022-07-06 22:25:10 +02:00
iCrawl
0b979b04f2 chore: add blocked label 2022-07-06 21:17:07 +02:00
Parbez
a4d1862982 refactor(builder): remove unsafe*Builders (#8074) 2022-07-06 20:42:51 +02:00
Suneet Tipirneni
34531c45e3 feat(website): add support for type parameter documentation (#8237) 2022-07-06 17:37:33 +02:00
Parbez
8198da5cd0 types(builder): remove casting (#8241) 2022-07-06 12:28:00 +02:00
iCrawl
ba10637529 chore: deps 2022-07-06 10:43:06 +02:00
iCrawl
68c3d8743e refactor(createApiModel): reusable function for api model creation 2022-07-05 17:00:44 +02:00
Almeida
a51f7215ec test(collection): improve coverage (#8222) 2022-07-05 16:10:42 +02:00
Jiralite
c271e05223 fix(SpeakingMap): Allow docgen to detect event name (#8236) 2022-07-05 16:10:23 +02:00
Almeida
d2e74003d5 chore: remove docgen test stuff (#8231) 2022-07-05 14:13:11 +02:00
ckohen
fd1c24036f fix(codecov): use cobertura (#8235) 2022-07-05 12:32:05 +02:00
ckohen
eb9ad46d4f fix(coverage): upload lcov instead of clover (#8234) 2022-07-05 10:52:38 +02:00
Almeida
5bd6b28b3e fix(Collection): make error messages consistent (#8224) 2022-07-04 17:40:33 +02:00
ckohen
f6db285c07 docs: add codecov coverage badge to readmes (#8226)
* docs: add codecov coverage badge to readmes

* docs: fix tab-space consistency
2022-07-04 14:00:27 +02:00
Almeida
68ade870f8 chore: upgrade vitest and add it as dep on each workspace (#8223) 2022-07-04 11:51:48 +02:00
Jiralite
c7a205f7b9 types(GuildMemberManager): Non-void return of edit() (#8186) 2022-07-03 18:04:29 +02:00
Almeida
c5750d59f5 refactor: make ShardEvents the events of Shard (#8185) 2022-07-03 18:04:19 +02:00
Suneet Tipirneni
31d5930464 fix(SelectMenuBuilder): properly accept SelectMenuOptionBuilders (#8174) 2022-07-03 18:04:08 +02:00
Jiralite
cdd9214212 fix: Remove global flag on regular expressions (#8177) 2022-07-03 15:36:53 +02:00
A. Román
fa010b5162 fix(MessagePayload): guard against repliedUser property (#8211) 2022-07-03 15:36:32 +02:00
A. Román
6b20645740 refactor(Util): make single replace call in cleanContent (#8210)
Co-authored-by: Almeida <almeidx@pm.me>
2022-07-03 15:36:20 +02:00
Almeida
50d55bd6b8 fix(ApplicationCommandManager): explicitly allow passing builders to methods (#8209) 2022-07-03 15:35:59 +02:00
Almeida
2d9dfa3c6e fix(TextInputBuilder): parse custom_id, label, and style (#8216) 2022-07-03 15:35:19 +02:00
Tyler Resch
ab238a9046 docs(MessageInteraction#commandName): updated description (#8212)
Co-authored-by: A. Román <kyradiscord@gmail.com>
2022-07-03 15:34:47 +02:00
Parbez
94ee60d3d4 feat(applicationCommand): add max min length in string option (#8215) 2022-07-03 15:34:04 +02:00
ckohen
f10f4cdcd8 feat: codecov (#8219) 2022-07-03 15:33:18 +02:00
Suneet Tipirneni
d95197cc78 feat: add website documentation early mvp (#8183)
Co-authored-by: iCrawl <buechler.noel@outlook.com>
2022-07-01 20:54:15 +02:00
Jiralite
e0c8282490 docs: Add missing @extends (#8205) 2022-07-01 17:48:11 +02:00
tnfAngel
741b3c8e27 docs: Remove Music bot in voice examples (#8203) 2022-07-01 10:54:11 +02:00
iCrawl
819a1fdf7d ci: check for main package before moving api-extractor docs 2022-06-30 16:17:52 +02:00
iCrawl
ce9afbb8e4 ci: fix building before generating docs 2022-06-30 15:56:07 +02:00
iCrawl
b2776c22d4 ci: api-extractor support for docs 2022-06-30 15:46:14 +02:00
DD
525bf031a5 chore: revert pre-commit hook to not change state (#8200) 2022-06-30 11:47:27 +02:00
CarelessInternet
27d8deb471 types: add missing shard types (#8180) 2022-06-30 00:37:55 +02:00
Xaliks
11b1739319 fix(GuildMemberRemove): remove member's presence (#8181) 2022-06-30 00:37:47 +02:00
Jiralite
b83e0c0caf types: Implement GuildChannelEditOptions (#8184) 2022-06-30 00:37:38 +02:00
Almeida
8421f9203b types(Status): add missing members (#8179) 2022-06-30 00:37:31 +02:00
A. Román
cb3dca4ae0 refactor(ApplicationCommandManager): use makeURLSearchParams (#8196) 2022-06-30 00:36:47 +02:00
MateoDeveloper
002d6a5aed feat(BaseInteraction): add support for app_permissions (#8194)
Co-authored-by: Almeida <almeidx@pm.me>
2022-06-30 00:36:32 +02:00
DD
c4653f97b1 feat(util): parseWebhookURL (#8166)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2022-06-25 11:02:11 +02:00
Suneet Tipirneni
e24970e3c3 refactor: Use Base prefix for channel and interaction base classes (#8099) 2022-06-24 10:42:50 +02:00
Tyler Resch
65dc8d677e types(GuildScheduledEvent#scheduledStartAt): should be nullish (#8111) 2022-06-24 10:42:39 +02:00
Almeida
0ffbef506a fix: edit() data can be partial and defaultMemberPermissions can be null (#8163) 2022-06-24 10:42:20 +02:00
iCrawl
5d3dd55a26 chore(changelog): add v13 changelog 2022-06-23 18:28:32 +02:00
Skick
70b42bb64a types(voice): bring back typed events (#8109) 2022-06-23 12:39:36 +02:00
Jan
af04992ed3 docs(Constants): fix SweeperKeys type (#8157) 2022-06-23 12:37:12 +02:00
ckohen
bbdb5d980b revert: refactor: move eslint.tsconfig.json to root (#8159) 2022-06-23 12:36:42 +02:00
Suneet Tipirneni
7279f9c31b types: fix modal builder constructor data type (#8143) 2022-06-22 20:37:46 +02:00
Jiralite
5e5853a4e8 docs(Channels): internally document channel creation (#8154) 2022-06-22 20:37:24 +02:00
Jiralite
cd17aad720 refactor(Constants): Remove leftover code (#8156)
* refactor(Constants): tidy up file

* docs(Constants): add type definition
2022-06-22 20:36:58 +02:00
Jiralite
ee36d60dc6 docs: Update threads to use ThreadAutoArchiveDuration (#8153) 2022-06-22 20:34:41 +02:00
SpaceEEC
c34c02ab8d fix(WebSocketShard): keep an error handler on connections (#8150) 2022-06-22 20:34:11 +02:00
Almeida
31f658247f fix(DJSError): error code validation (#8149) 2022-06-22 20:33:47 +02:00
Jiralite
a3799f9ebb types: Use ThreadAutoArchiveDuration from discord-api-types (#8145) 2022-06-22 11:23:39 +02:00
Jiralite
a061233510 docs(APITypes): Remove duplicate type definition (#8144) 2022-06-22 11:23:17 +02:00
Jiralite
203bc4a2cf docs: Document missing type definitions (#8130)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2022-06-22 11:23:03 +02:00
Parbez
65d1879c0a chore: move deps to root and some miscellaneous changes (#8129) 2022-06-21 15:15:38 +02:00
Parbez
c6f285b7b0 refactor: remove @sindresorhus/is as it's now esm only (#8133) 2022-06-21 14:41:33 +02:00
pat
2eeaad6f27 fix(vcs): nsfw property (#8132) 2022-06-21 14:35:42 +02:00
pat
f1ac17c961 docs(InteractionResponse): fix return (#8141) 2022-06-21 14:35:33 +02:00
Jiralite
db2b0333d9 fix(WebSocketManager): Correct error name (#8138) 2022-06-21 14:35:17 +02:00
DD
94f7ca9474 chore: update proxy-container README (#8122)
Co-authored-by: Almeida <almeidx@pm.me>
2022-06-20 14:47:19 +02:00
DD
e68effa822 refactor: errors (#8068)
Co-authored-by: Parbez <imranbarbhuiya.fsd@gmail.com>
Co-authored-by: A. Román <kyradiscord@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2022-06-20 14:46:35 +02:00
iCrawl
358c3f4a46 chore: upgrade deps 2022-06-19 13:19:24 +02:00
DD
268a9b4be5 fix: vitest recursion (#8121) 2022-06-19 13:18:36 +02:00
KinectTheUnknown
95e6d6ede0 types(Shard#reconnecting): fix event name (#8118) 2022-06-19 12:24:04 +02:00
DD
17867f9154 fix(proxy-container): proper deps (#8120) 2022-06-19 12:17:47 +02:00
Jiralite
3a77ce0b18 docs(PermissionsBitField): Fix @name of bitfield (#8115)
docs(PermissionsBitField): `Permission` -> `PermissionsBitField`
2022-06-18 18:42:47 +02:00
Jiralite
23e183a9ac fix(WebSocketShard): Disconnected casing (#8117) 2022-06-18 18:42:30 +02:00
Parbez
b3c3a94d5d ci: don't run publish workflow on forks (#8116) 2022-06-18 18:42:09 +02:00
DD
8610700c87 fix(ci): log into dockerhub properly (#8114) 2022-06-18 13:59:05 +02:00
Jiralite
db663a55c2 docs: TextBasedChannel -> TextBasedChannels typos (#8110) 2022-06-18 13:02:41 +02:00
DD
0673ea377a fix(proxy-container): add @discordjs/rest to deps (#8113) 2022-06-18 13:02:12 +02:00
DD
2681929e42 feat: proxy container (#8000) 2022-06-17 23:29:50 +02:00
Jiralite
0a138dab95 docs: Remove numbers from enums (#8098) 2022-06-17 23:28:30 +02:00
Jiralite
415513696c docs(GuildAuditLogs): Fix and reimplement type definitions (#8108) 2022-06-17 23:27:54 +02:00
Almeida
90a98fee16 refactor(ClientOptions): remove $ prefix from ws.properties keys (#8094) 2022-06-17 23:26:42 +02:00
advaith
386c41f24f docs(WebSocketOptions): add version to docs and typings (#8050) 2022-06-17 23:26:08 +02:00
pat
d54bf5d286 fix(webhooks): revert webhook caching (and returning Message) (#8038) 2022-06-17 23:25:46 +02:00
Jiralite
e5ec1c4dbc refactor: Use GuildFeature enum (#8101) 2022-06-17 23:25:29 +02:00
Jiralite
ad9ab2b177 chore: Add MessageContent to issue form (#8106) 2022-06-17 23:24:26 +02:00
Rodry
4df491ce85 types(ApplicationCommand): fix typo in setDMPermission (#8097) 2022-06-16 09:59:46 +02:00
Jiralite
0a44b05db8 fix(ApplicationCommand): Remove autocomplete check at the top level and correctly check for dmPermission (#8100) 2022-06-16 09:58:54 +02:00
Almeida
b4e28a8ff6 types: fix setType() parameter and ChannelData.type (#8089) 2022-06-13 23:43:10 +02:00
Jiralite
9c0f190de1 docs(BaseGuildTextChannel): Update setType()'s parameter type (#8088) 2022-06-13 22:09:00 +02:00
BaumianerNiklas
093117d938 chore: remove -types import in readme example (#8085) 2022-06-13 21:42:28 +02:00
Suneet Tipirneni
e53d162198 refactor(util): make utility functions top level (#8052)
* refactor(util): make functions top level

* types: make channel typeguards more strict

* chore: make requested changes
2022-06-13 20:04:53 +02:00
Almeida
51eadf3737 docs: update outdated examples (#8081) 2022-06-13 18:18:15 +02:00
Jiralite
552ec72542 docs(ThreadMemberManager): Require member in FetchThreadMemberOptions (#8079) 2022-06-13 18:17:44 +02:00
Ben
ac7bf692bf docs(AutocompleteInteraction): change useless log in responds example (#8077) 2022-06-13 18:16:54 +02:00
n1ck_pro
9964454c29 types: fix ApplicationCommandPermissionsUpdate event typings (#8071) 2022-06-13 18:16:07 +02:00
Rodry
476b7d519c types(AutocompleteOption): fix and improve types (#8069) 2022-06-13 18:15:31 +02:00
Jiralite
10a6c4287d feat(AutocompleteInteraction): Add commandGuildId (#8086) 2022-06-13 18:14:01 +02:00
Jiralite
a2eebf6c66 docs: Description and missing @typedef fixes (#8087) 2022-06-13 18:12:08 +02:00
CodeGoat
96053babe1 fix(ApplicationCommand): fix default member permissions assignment (#8067) 2022-06-11 11:05:43 +02:00
ckohen
f527dea36e fix(scripts): read directory and rerun (#8065) 2022-06-11 11:04:53 +02:00
ckohen
c7391db11b refactor(ApplicationCommand): permissions v2 (#7857)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2022-06-10 21:34:17 +02:00
Suneet Tipirneni
c5176be14b feat(guild): add support for setting MFA level (#8024) 2022-06-10 21:26:11 +02:00
Parbez
fbe67e1025 fix: select menu options to accept both rest and array (#8032)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2022-06-10 21:22:04 +02:00
Parbez
3bb9c0e5c3 fix: check for function type (#8064) 2022-06-10 21:21:45 +02:00
DD
9c8b3102ce refactor(*): include name/reason/etc fields into options/data params (#8026) 2022-06-10 21:20:59 +02:00
Jiralite
2392a6f5de types(ThreadMemberManager): Fix return type of fetching members with no arguments (#8060)
* types(ThreadMemberManager): non-optional first overload for fetching

* test: organisation
2022-06-10 21:20:00 +02:00
Parbez
c0f079d232 typings: remove isAutocomplete typeguard from typings (#8063) 2022-06-10 21:19:44 +02:00
Jiralite
d8077c6839 fix(CommandInteractionOptionResolver): Handle autocompletion interactions (#8058) 2022-06-10 21:19:27 +02:00
iCrawl
d4b41dd081 feat(docgen): proper event parsing for typescript 2022-06-10 16:22:11 +02:00
pat
0415300243 feat(vcs): add missing property and methods (#8002) 2022-06-10 13:42:53 +02:00
Jeroen Claassens
caee94897f build: fix git cliff config files (#8057) 2022-06-10 13:37:24 +02:00
iCrawl
b3346f4b9b feat(docgen): update typedoc 2022-06-10 12:59:46 +02:00
iCrawl
2791c86cdf chore: remove unneeded tsc build 2022-06-09 21:27:06 +02:00
Almeida
c8f1690896 refactor(collection): remove default property (#8055) 2022-06-09 20:53:23 +02:00
Jiralite
da9107c007 refactor(ThreadMemberManager): Consistent thread member fetching (#8021) 2022-06-09 20:52:56 +02:00
Suneet Tipirneni
f57d6768ad refactor(interactions): remove redundant interaction typeguards (#8027) 2022-06-09 20:52:44 +02:00
iCrawl
d7b8357dcb fix(docgen): strip dots from return types 2022-06-09 20:47:51 +02:00
A. Román
16810f3e41 refactor(collection): remove default export (#8053) 2022-06-09 16:53:01 +02:00
A. Román
598f61b992 fix(scripts): add quotes around blob arguments (#8054) 2022-06-09 16:52:18 +02:00
iCrawl
50401453e7 fix(docgen): shorten output for path info 2022-06-09 16:14:37 +02:00
Almeida
94bdcaca62 docs: ignore docs of unexported functions (#8051) 2022-06-09 13:58:42 +02:00
iCrawl
eea139b346 feat(docgen): support for ignore tag 2022-06-09 13:54:35 +02:00
iCrawl
50822f5254 fix(docgen): parsing constructor 2022-06-09 11:37:22 +02:00
muchnameless
f2b267c079 fix(Message): force fetching (#8047) 2022-06-09 10:35:52 +02:00
advaith
b2eea1c900 docs(ClientOptions): fix closeTimeout default (#8049) 2022-06-09 10:35:27 +02:00
iCrawl
3ae2633c3f feat(website): add some styling 2022-06-08 23:40:03 +02:00
iCrawl
3937b402c0 fix(website): don't build concurrently 2022-06-08 22:26:39 +02:00
iCrawl
256c4f955c feat(website): unocss 2022-06-08 21:45:16 +02:00
iCrawl
33cdcdbb7a fix: vercel deployment 2022-06-08 20:09:23 +02:00
iCrawl
bc466a5997 fix(website): deployment 2022-06-08 19:36:09 +02:00
Noel
127931d1df feat: website (#8043) 2022-06-08 19:13:31 +02:00
iCrawl
5259639c2c fix: doc generation for return types 2022-06-08 19:12:42 +02:00
iCrawl
5de9b80814 fix: returns for typescript parsing 2022-06-08 18:41:22 +02:00
iCrawl
bc4fbcef2e fix(serializer): properly serialize data 2022-06-08 18:11:25 +02:00
iCrawl
3279b40912 feat(docgen): typescript support 2022-06-08 17:26:54 +02:00
Synbulat Biishev
1afae909d7 fix(Attachment): do not destructure data (#8041) 2022-06-08 13:30:06 +02:00
iCrawl
65cb36166f fix(VarType): parsing type names 2022-06-08 13:27:41 +02:00
Superchupu
ecc6600df2 refactor(docgen): use the node: protocol (#8034)
Co-authored-by: Synbulat Biishev <syjalo.dev@gmail.com>
2022-06-08 00:17:48 +02:00
iCrawl
314d76e907 fix(docgen): fix up method return types 2022-06-07 15:19:42 +02:00
Parbez
769ea0bfe7 refactor: move all the config files to root (#8033) 2022-06-07 12:35:19 +02:00
Noel
8b979c0245 feat: docgen package (#8029) 2022-06-07 10:51:33 +02:00
Noel
5475767c2c build: use cliff-jumper for releases (#8030) 2022-06-07 00:59:21 +02:00
Jiralite
86d8fbc023 fix(DirectoryChannel): Type name and handle url (#8023) 2022-06-06 15:47:13 +02:00
iCrawl
fba9710fc9 chore(builders): dev version 2022-06-06 14:45:46 +02:00
iCrawl
5ca3974301 chore(release): version 2022-06-06 14:44:25 +02:00
iCrawl
3202c91c5a chore: properly adapt changelog script 2022-06-06 14:43:15 +02:00
Jiralite
f3f34f07b3 docs(DirectoryChannel): Extend Channel (#8022) 2022-06-06 14:24:35 +02:00
Parbez
f8ed71bfca fix: readd isThread type guard (#8019) 2022-06-06 14:24:03 +02:00
Voxelli
e1176faa27 feat: backport handle zombie connection (#7626)
* feat: backport zombie connection fixes

* fix: enums

* fix: prettier

* feat: add zombie connection event to shard events

* Apply suggestions from code review

Co-authored-by: muchnameless <12682826+muchnameless@users.noreply.github.com>

* fix: prettier

* fix: handleZombieConnection

* feat: backport new logic of handling zombie connection

Co-authored-by: muchnameless <12682826+muchnameless@users.noreply.github.com>
2022-06-06 12:21:35 +02:00
Caleb Lam
aa59a409b3 feat(CommandInteraction): add 'commandGuildId' (#8018) 2022-06-06 10:07:37 +02:00
Rodry
7fa698d23e types(AttachmentBuilder): fix data type (#8016)
* types(AttachmentBuilder): fix data type

* types(MessageOptions): add AttachmentPayload
2022-06-06 10:07:15 +02:00
markisha64
b9df37a89f refact: Sticker's tags property (#8010) 2022-06-05 23:29:31 +02:00
Rodry
ad75be9a9c feat: allow builders to accept rest params and arrays (#7874)
Co-authored-by: Parbez <imranbarbhuiya.fsd@gmail.com>
Co-authored-by: Khafra <42794878+KhafraDev@users.noreply.github.com>
2022-06-05 23:29:16 +02:00
Suneet Tipirneni
70c733bb9a refactor(channel): remove redundant channel type guards (#8012) 2022-06-05 23:29:05 +02:00
Rodry
a3287782b5 feat(MessageReaction): add react method (#7810) 2022-06-05 23:28:44 +02:00
Suneet Tipirneni
0ccc243c8f types(modal): fix showModal() typings (#8014) 2022-06-05 23:28:28 +02:00
Almeida
0a7953e463 docs(Attachment): remove constructor doc (#8009) 2022-06-05 23:28:18 +02:00
Parbez
6aa623240e types: fix some attachment related typings (#8013) 2022-06-05 22:37:56 +02:00
n1ck_pro
6266b0c1e3 types(AttachmentBuilder): remove name parameter from constructor (#8008) 2022-06-05 22:37:01 +02:00
Suneet Tipirneni
9720e55534 refactor: always return Message instances in interactions (#7917)
Co-authored-by: Almeida <almeidx@pm.me>
2022-06-05 19:00:35 +02:00
Parbez
ad36c0be77 fix: add static method from in builders (#7990) 2022-06-05 18:33:19 +02:00
SpaceEEC
5987dbe5cf docs(VoiceChannel): annotate that it is implementing TextBasedChannel (#8007) 2022-06-05 18:30:14 +02:00
Rodry
5244fe3c1c feat(Collector): add ignore event (#7644)
Co-authored-by: Parbez <imranbarbhuiya.fsd@gmail.com>
2022-06-05 18:29:13 +02:00
Synbulat Biishev
349766dd69 feat(GuildMemberManager): add GuildMemberManager#fetchMe() (#7526) 2022-06-05 18:29:00 +02:00
markisha64
7a1095b66b fix: typings (#7965)
Co-authored-by: Almeida <almeidx@pm.me>
2022-06-05 09:36:59 +02:00
iCrawl
10009a43ee ci: remove cache-dir from test 2022-06-05 01:14:39 +02:00
iCrawl
8d8e6c03de feat: use vitest instead of jest for more speed 2022-06-05 01:07:10 +02:00
Suneet Tipirneni
dfadcbc2fd refactor(attachment): don't return attachment builders from API (#7852)
Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: A. Román <kyradiscord@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2022-06-04 22:33:13 +02:00
n1ck_pro
546d48655f docs: add missing discord-api-types external types (#8001) 2022-06-04 22:27:01 +02:00
iCrawl
f8739bd9c0 fix(voice): re-add accidental removal of postbuild script 2022-06-04 19:15:28 +02:00
iCrawl
f2ae1f9348 feat: add scripts package for locally used scripts 2022-06-04 19:07:50 +02:00
iCrawl
3401fd4eb6 chore: remove leftover files from pre-monorepo era 2022-06-04 18:41:37 +02:00
iCrawl
fdbd229832 ci: equality check on tag and package name 2022-06-04 17:57:07 +02:00
iCrawl
9e8e2411c1 ci: check for the correct prop to be defined 2022-06-04 17:51:31 +02:00
iCrawl
c02ced9a22 ci: fix if checks for branch/tag when using workflow dispatch 2022-06-04 17:37:00 +02:00
iCrawl
8c5a7f80ef ci: fix inputs for workflow dispatches 2022-06-04 17:15:08 +02:00
iCrawl
14018b0118 ci: allow workflow dispatches 2022-06-04 17:13:40 +02:00
iCrawl
8095723604 chore: only build cjs for actions 2022-06-04 17:08:26 +02:00
iCrawl
e17bb54c85 chore: update dev versions 2022-06-04 17:01:47 +02:00
1216 changed files with 77059 additions and 20122 deletions

67
.dockerignore Normal file
View File

@@ -0,0 +1,67 @@
# Packages
**/node_modules
# Log files
**/logs
**/*.log
**/npm-debug.log*
# Runtime data
**/pids
**/*.pid
**/*.seed
# Env
**/.env
# Dist
**/dist/
**/dist-docs/
# Miscellaneous
**/.tmp
**/.vscode
**/.idea
**/.DS_Store
**/.turbo
**/tsconfig.tsbuildinfo
**/coverage
**/__tests__
**/out
# yarn
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
# Cache
**/.prettiercache
**/.eslintcache
**/.vercel
# Docker specific
**/.cliff-jumperrc.json
**/api-extractor.json
**/api-extractor-docs.json
**/.eslintignore
**/.eslintrc.json
**/.lintstagedrc.js
**/.lintstagedrc.cjs
**/.lintstagedrc.json
**/.prettierignore
**/.prettierrc.js
**/.prettierrc.cjs
**/.prettierrc.json
**/cliff.toml
**/CHANGELOG.md
**/README.md
**/LICENSE
**/tsconfig.eslint.json
**/tsconfig.docs.json
**/docs/
**/vitest.config.ts

11
.eslintrc.json Normal file
View File

@@ -0,0 +1,11 @@
{
"root": true,
"extends": ["neon/common", "neon/node", "neon/typescript", "neon/prettier"],
"parserOptions": {
"project": ["./tsconfig.eslint.json", "./apps/*/tsconfig.eslint.json", "./packages/*/tsconfig.eslint.json"]
},
"rules": {
"@typescript-eslint/consistent-type-definitions": ["error", "interface"]
},
"ignorePatterns": ["**/dist/*"]
}

11
.github/.kodiak.toml vendored Normal file
View File

@@ -0,0 +1,11 @@
version = 1
[merge]
require_automerge_label = false
blocking_labels = ['blocked']
method = 'squash'
[merge.message]
title = 'pull_request_title'
strip_html_comments = true
include_coauthors = true

28
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1,28 @@
# Learn how to add code owners here:
# https://help.github.com/en/articles/about-code-owners
* @iCrawl
/apps/guide/ @discordjs/website @discordjs/guide
/apps/guide/src/content/ @discordjs/guide
/apps/website/ @discordjs/website
/packages/actions/ @discordjs/actions
/packages/api-extractor-utils/ @discordjs/api-extractor-utils
/packages/brokers/ @discordjs/brokers
/packages/builders/ @discordjs/builders
/packages/collection/ @discordjs/collection
/packages/core/ @discordjs/core
/packages/create-discord-bot/ @discordjs/guide
/packages/discord.js/ @discordjs/core
/packages/docgen/ @iCrawl
/packages/formatters/ @discordjs/formatters
/packages/next/ @discordjs/core
/packages/proxy/ @discordjs/proxy
/packages/proxy-container/ @discordjs/proxy
/packages/rest/ @discordjs/rest
/packages/scripts/ @discordjs/scripts
/packages/ui/ @discordjs/ui
/packages/util/ @discordjs/util
/packages/voice/ @discordjs/core
/packages/ws/ @discordjs/ws

View File

@@ -16,3 +16,33 @@ To get ready to work on the codebase, please do the following:
4. Code your heart out!
5. Run `yarn test` to run ESLint and ensure any JSDoc changes are valid
6. [Submit a pull request](https://github.com/discordjs/discord.js/compare) (Make sure you follow the [conventional commit format](https://github.com/discordjs/discord.js/blob/main/.github/COMMIT_CONVENTION.md))
## Testing changes locally
If you want to test changes you've made locally, you can do so by using `yarn link`. This will create a symlink to your local copy of the discord.js libraries.
1. Create a new directory `mkdir discordjs-test` and move into it `cd discordjs-test`
2. Initialize a new yarn 3 project `yarn init -2`
3. Disable pnp `yarn config set nodeLinker node-modules`
4. Now link the local discord.js project you cloned earlier `yarn link -A {PATH_TO_DISCORDJS_REPO}`
5. Install packages you'd like to test locally `yarn add discord.js@latest`, `yarn add @discordjs/rest@latest`, etc. **Note: Make sure you use `latest` tag or else yarn will try to install the remote package from npm**
6. Import the package in your source code and test them out!
### Working with TypeScript packages
When testing local changes, you may notice you need to manually recompile TypeScript projects on every change in order to get the latest code changes to test locally.
To avoid this you can use the `--watch` parameter in the package build script to automatically recompile the project when changes are detected.
For example, to automatically recompile the `@discordjs/rest` project when changes are detected, run `yarn turbo run build --filter=@discordjs/rest -- --watch` in the root folder of where you cloned the discord.js repo.
## Adding new packages
If you'd like to create another package under the `@discordjs` organization run the following command:
```sh
yarn create-package <package-name> [package-description]
```
This will create new package directory under `packages/` with the required configuration files. You can
begin to make changes within the `src/` directory. It may also be required to update the CODEOWNERS file.

View File

@@ -1,79 +1,77 @@
name: Bug report
description: Report incorrect or unexpected behavior of a package
description: Report an issue with discord.js or another package.
labels: [bug, need repro]
body:
- type: markdown
attributes:
value: |
Use Discord for questions: https://discord.gg/djs
Thank you for filing an issue! If you are here to ask a question, use Discord instead: https://discord.gg/djs
This issue form is for discord.js, including other packages.
- type: dropdown
id: package
attributes:
label: Which package is this bug report for?
options:
- discord.js
- brokers
- builders
- collection
- rest
- core
- create-discord-bot
- formatters
- next
- proxy
- proxy-container
- rest
- ui
- util
- voice
- ws
validations:
required: true
- type: textarea
id: description
attributes:
label: Issue description
description: |
Describe the issue in as much detail as possible.
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files into it.
description: Describe the issue in as much detail as possible.
placeholder: |
Steps to reproduce with below code sample:
1. do thing
2. do thing in Discord client
3. observe behavior
4. see error logs below
1. Do thing
2. Do thing in Discord client
3. Observe behavior
4. See error logs below
validations:
required: true
- type: textarea
id: codesample
id: code_sample
attributes:
label: Code sample
description: Include a reproducible, minimal code sample. This will be automatically formatted into code, so no need for backticks.
render: typescript
placeholder: |
Your code sample should be...
... Minimal - Use as little code as possible that still produces the same problem (and is understandable)
... Complete - Provide all parts someone else needs to reproduce your problem
... Reproducible - Test the code you're about to provide to make sure it reproduces the problem
- type: input
id: djs-version
attributes:
label: Package version
description: Which version of are you using? Run `npm list <package>` in your project directory and paste the output.
placeholder: We no longer support version 12 or earlier of discord.js
validations:
required: true
- type: input
id: node-version
attributes:
label: Node.js version
description: |
Which version of Node.js are you using? Run `node --version` in your project directory and paste the output.
If you are using TypeScript, please include its version (`npm list typescript`) as well.
placeholder: Node.js version 16.9+ is required for version 14.0.0+
Your code sample should be:
1. Minimal - Use as little code as possible that still produces the same problem (and is understandable)
2. Complete - Provide all parts someone else needs to reproduce your problem
3. Reproducible - Test the code you're about to provide to make sure it reproduces the problem
This will be automatically formatted into code, so no need for backticks.
render: typescript
- type: textarea
id: versions
attributes:
label: Versions
description: List necessary versions here. This includes your package version, runtime version, operating system etc.
placeholder: |
- discord.js 14.12.1 (`npm ls discord.js` or another package)
- Node.js 16.11.0 (`node --version`)
- TypeScript 5.1.6 (`npm ls typescript` if you use it)
- macOS Ventura 13.3.1
validations:
required: true
- type: input
id: os
attributes:
label: Operating system
description: Which OS does your application run on?
- type: dropdown
id: priority
attributes:
label: Priority this issue should have
description: Please be realistic. If you need to elaborate on your reasoning, please use the Issue description field above.
label: Issue priority
description: Please be realistic. If you need to elaborate on your reasoning, please use the issue description field above.
options:
- Low (slightly annoying)
- Medium (should be fixed soon)
@@ -84,12 +82,9 @@ body:
id: partials
attributes:
label: Which partials do you have configured?
description: |
Check your Client constructor for the `partials` key.
Tip: you can select multiple items
description: Check your `Client` constructor for the `partials` key.
options:
- Not applicable (subpackage bug)
- Not applicable
- No Partials
- User
- Channel
@@ -105,16 +100,13 @@ body:
id: intents
attributes:
label: Which gateway intents are you subscribing to?
description: |
Check your Client constructor options for the `intents` key.
Tip: you can select multiple items
description: Check your `Client` constructor for the `intents` key.
options:
- Not applicable (subpackage bug)
- Not applicable
- No Intents
- Guilds
- GuildMembers
- GuildBans
- GuildModeration
- GuildEmojisAndStickers
- GuildIntegrations
- GuildWebhooks
@@ -127,12 +119,15 @@ body:
- DirectMessages
- DirectMessageReactions
- DirectMessageTyping
- MessageContent
- GuildScheduledEvents
- AutoModerationConfiguration
- AutoModerationExecution
multiple: true
validations:
required: true
- type: input
id: dev-release
id: dev_release
attributes:
label: I have tested this issue on a development release
placeholder: d23280c (commit hash)

View File

@@ -0,0 +1,58 @@
name: Websites bug report
description: Report an issue with the documentation or guide websites.
labels: [bug, need repro]
body:
- type: markdown
attributes:
value: |
Thank you for filing an issue! If you are here to ask a question, use Discord instead: https://discord.gg/djs
This issue form is for our documentation and guide websites.
- type: dropdown
id: application
attributes:
label: Which application is this bug report for?
options:
- Documentation
- Guide
validations:
required: true
- type: textarea
id: description
attributes:
label: Issue description
description: Describe the issue in as much detail as possible.
validations:
required: true
- type: textarea
id: steps_to_reproduce
attributes:
label: Steps to Reproduce
description: What steps must be taken to reproduce this issue?
placeholder: |
1. Visit a page
2. Click a link
3. ...
validations:
required: true
- type: textarea
id: versions
attributes:
label: Versions
description: List necessary versions here. This includes your browser, operating system etc.
placeholder: |
- Safari 16.4 (18615.1.26.11.23)
- macOS Ventura 13.3.1
validations:
required: true
- type: dropdown
id: priority
attributes:
label: Issue priority
description: Please be realistic. If you need to elaborate on your reasoning, please use the issue description field above.
options:
- Low (slightly annoying)
- Medium (should be fixed soon)
- High (immediate attention needed)
validations:
required: true

View File

@@ -5,20 +5,31 @@ body:
- type: markdown
attributes:
value: |
We can only implement features that Discord publishes, documents and merges into the Discord API documentation.
We can only implement features that Discord publishes, documents, and merges into the Discord API documentation.
We do not implement unreleased features.
Use Discord for questions: https://discord.gg/djs
- type: dropdown
id: package
id: application_or_package
attributes:
label: Which package is the feature request for?
label: Which application or package is this feature request for?
options:
- discord.js
- Documentation
- Guide
- brokers
- builders
- collection
- rest
- core
- create-discord-bot
- formatters
- next
- proxy
- proxy-container
- rest
- ui
- util
- voice
- ws
validations:
required: true
- type: textarea
@@ -42,7 +53,7 @@ body:
label: Alternative solutions or implementations
description: A clear and concise description of any alternative solutions or features you have considered.
- type: textarea
id: additional-context
id: additional_context
attributes:
label: Other context
description: Any other context, screenshots, or file uploads that help us understand your feature request.

View File

@@ -1,8 +0,0 @@
addReviewers: true
reviewers:
- iCrawl
- SpaceEEC
- kyranet
- vladfrangu
numberOfReviewers: 0
runOnDraft: true

51
.github/issue-labeler.yml vendored Normal file
View File

@@ -0,0 +1,51 @@
apps:guide:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\nGuide\\n"
apps:website:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\nDocumentation\\n"
packages:brokers:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\nbrokers\\n"
packages:builders:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\nbuilders\\n"
packages:collection:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\ncollection\\n"
packages:core:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\ncore\\n"
packages:create-discord-bot:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\ncreate-discord-bot\\n"
packages:discord.js:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\ndiscord.js\\n"
packages:formatters:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\nformatters\\n"
packages:next:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\nnext\\n"
packages:proxy:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\nproxy\\n"
packages:proxy-container:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\nproxy-container\\n"
packages:rest:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\nrest\\n"
packages:ui:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\ui\\n"
packages:util:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\util\\n"
packages:voice:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\nvoice\\n"
packages:ws:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\nws\\n"

57
.github/labeler.yml vendored
View File

@@ -1,31 +1,54 @@
chore:
- any: ['*']
all: ['!packages/*', '!packages/**/*']
'packages:builders':
apps:guide:
- apps/guide/*
- apps/guide/**/*
apps:website:
- apps/website/*
- apps/website/**/*
packages:brokers:
- packages/brokers/*
- packages/brokers/**/*
packages:builders:
- packages/builders/*
- packages/builders/**/*
'packages:collection':
packages:collection:
- packages/collection/*
- packages/collection/**/*
'packages:discord.js':
packages:core:
- packages/core/*
- packages/core/**/*
packages:create-discord-bot:
- packages/create-discord-bot/*
- packages/create-discord-bot/**/*
packages:discord.js:
- packages/discord.js/*
- packages/discord.js/**/*
'packages:proxy':
packages:docgen:
- packages/docgen/*
- packages/docgen/**/*
packages:formatters:
- packages/formatters/*
- packages/formatters/**/*
packages:next:
- packages/next/*
- packages/next/**/*
packages:proxy:
- packages/proxy/*
- packages/proxy/**/*
'packages:rest':
packages:proxy-container:
- packages/proxy-container/*
- packages/proxy-container/**/*
packages:rest:
- packages/rest/*
- packages/rest/**/*
'packages:voice':
packages:ui:
- packages/ui/*
- packages/ui/**/*
packages:util:
- packages/util/*
- packages/util/**/*
packages:voice:
- packages/voice/*
- packages/voice/**/*
'packages:ws':
packages:ws:
- packages/ws/*
- packages/ws/**/*

214
.github/labels.yml vendored
View File

@@ -1,94 +1,120 @@
- name: 'api changes'
color: '5663e9'
- name: 'api support'
color: '5663e9'
- name: 'backlog'
color: '7ef7ef'
- name: 'bug'
color: 'd73a4a'
- name: 'caching'
color: '80c042'
- name: 'chore'
color: 'ffffff'
- name: 'ci'
color: '0075ca'
- name: 'dependencies'
color: '276bd1'
- name: 'discussion'
color: 'b6b1f9'
- name: 'discord'
color: '5663e9'
- name: 'documentation'
color: '0075ca'
- name: 'duplicate'
color: 'cfd3d7'
- name: 'error handling'
color: '80c042'
- name: 'feature request'
color: 'fcf95a'
- name: 'gateway'
color: '80c042'
- name: 'good first issue'
color: '7057ff'
- name: 'has PR'
color: '4b1f8e'
- name: 'help wanted'
color: '008672'
- name: 'interactions'
color: '80c042'
- name: 'in progress'
color: 'ffccd7'
- name: 'in review'
color: 'aed5fc'
- name: 'invalid'
color: 'e4e669'
- name: 'need repro'
color: 'c66037'
- name: 'packages:builders'
color: 'fbca04'
- name: 'packages:collection'
color: 'fbca04'
- name: 'packages:discord.js'
color: 'fbca04'
- name: 'packages:proxy'
color: 'fbca04'
- name: 'packages:rest'
color: 'fbca04'
- name: 'packages:voice'
color: 'fbca04'
- name: 'packages:ws'
color: 'fbca04'
- name: 'performance'
color: '80c042'
- name: 'permissions'
color: '80c042'
- name: 'priority:high'
color: 'fc1423'
- name: 'question (please use Discord instead)'
color: 'd876e3'
- name: 'ratelimits'
color: '80c042'
- name: 'refactor'
color: '1d637f'
- name: 'regression'
color: 'ea8785'
- name: 'REST'
color: '80c042'
- name: 'semver:major'
color: 'c10f47'
- name: 'semver:minor'
color: 'e4f486'
- name: 'semver:patch'
color: 'e8be8b'
- name: 'sharding'
color: '80c042'
- name: 'tests'
color: 'f06dff'
- name: 'threads'
color: '80c042'
- name: 'typings'
color: '80c042'
- name: 'utility'
color: '80c042'
- name: 'wontfix'
color: 'ffffff'
- name: api changes
color: 5663e9
- name: api support
color: 5663e9
- name: apps:guide
color: fbca04
- name: apps:website
color: fbca04
- name: backlog
color: 7ef7ef
- name: backport
color: 88aabb
- name: blocked
color: fc1423
- name: bug
color: d73a4a
- name: caching
color: 80c042
- name: chore
color: ffffff
- name: ci
color: 0075ca
- name: dependencies
color: 276bd1
- name: discord
color: 5663e9
- name: discussion
color: b6b1f9
- name: documentation
color: 0075ca
- name: duplicate
color: cfd3d7
- name: error handling
color: 80c042
- name: feature request
color: fcf95a
- name: gateway
color: 80c042
- name: good first issue
color: 7057ff
- name: has PR
color: 4b1f8e
- name: help wanted
color: 008672
- name: in progress
color: ffccd7
- name: in review
color: aed5fc
- name: interactions
color: 80c042
- name: invalid
color: e4e669
- name: need repro
color: c66037
- name: packages:brokers
color: fbca04
- name: packages:builders
color: fbca04
- name: packages:collection
color: fbca04
- name: packages:core
color: fbca04
- name: packages:create-discord-bot
color: fbca04
- name: packages:discord.js
color: fbca04
- name: packages:docgen
color: fbca04
- name: packages:formatters
color: fbca04
- name: packages:next
color: fbca04
- name: packages:proxy
color: fbca04
- name: packages:proxy-container
color: fbca04
- name: packages:rest
color: fbca04
- name: packages:ui
color: fbca04
- name: packages:util
color: fbca04
- name: packages:voice
color: fbca04
- name: packages:ws
color: fbca04
- name: performance
color: 80c042
- name: permissions
color: 80c042
- name: priority:high
color: fc1423
- name: question (please use Discord instead)
color: d876e3
- name: ratelimits
color: 80c042
- name: refactor
color: 1d637f
- name: regression
color: ea8785
- name: REST
color: 80c042
- name: semver:major
color: c10f47
- name: semver:minor
color: e4f486
- name: semver:patch
color: e8be8b
- name: sharding
color: 80c042
- name: tests
color: f06dff
- name: threads
color: 80c042
- name: typings
color: 80c042
- name: utility
color: 80c042
- name: wontfix
color: ffffff

6
.github/powered-by-vercel.svg vendored Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
.github/powered-by-workers.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -3,133 +3,108 @@ on:
push:
branches:
- 'main'
- 'stable'
- '!docs'
paths:
- 'packages/*/src/**'
tags:
- '**'
workflow_dispatch:
inputs:
ref:
description: 'The branch, tag or SHA to checkout'
required: true
ref_type:
type: choice
description: 'Branch or tag'
options:
- branch
- tag
required: true
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build documentation
runs-on: ubuntu-latest
if: github.repository_owner == 'discordjs'
outputs:
BRANCH_NAME: ${{ steps.env.outputs.BRANCH_NAME }}
BRANCH_OR_TAG: ${{ steps.env.outputs.BRANCH_OR_TAG }}
SHA: ${{ steps.env.outputs.SHA }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install node.js v16
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: yarn.lock
- name: Turbo cache
id: turbo-cache
uses: actions/cache@v2
with:
path: .turbo
key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ github.sha }}
restore-keys: |
turbo-${{ github.job }}-${{ github.ref_name }}-
- name: Install dependencies
run: yarn --immutable
- name: Build docs
run: yarn docs --cache-dir=".turbo"
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: docs
path: packages/*/docs/docs.json
- name: Set outputs for upload job
id: env
run: |
echo "::set-output name=BRANCH_NAME::${GITHUB_REF_NAME}"
echo "::set-output name=BRANCH_OR_TAG::${GITHUB_REF_TYPE}"
echo "::set-output name=SHA::${GITHUB_SHA}"
upload:
name: Upload Documentation
needs: build
strategy:
max-parallel: 1
fail-fast: false
matrix:
package: ['builders', 'collection', 'discord.js', 'proxy', 'rest', 'voice']
name: Build & upload documentation
runs-on: ubuntu-latest
env:
BRANCH_NAME: ${{ needs.build.outputs.BRANCH_NAME }}
BRANCH_OR_TAG: ${{ needs.build.outputs.BRANCH_OR_TAG }}
SHA: ${{ needs.build.outputs.SHA }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
if: github.repository_owner == 'discordjs'
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install node.js v16
uses: actions/setup-node@v2
uses: actions/checkout@v3
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: yarn.lock
ref: ${{ inputs.ref || '' }}
- name: Turbo cache
id: turbo-cache
uses: actions/cache@v2
- name: Install node.js v18
uses: actions/setup-node@v3
with:
path: .turbo
key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ github.sha }}
restore-keys: |
turbo-${{ github.job }}-${{ github.ref_name }}-
node-version: 18
- name: Install dependencies
run: yarn --immutable
uses: ./packages/actions/src/yarnCache
- name: Build actions
run: yarn build --cache-dir=".turbo"
- name: Build dependencies
run: yarn build
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: docs
path: docs
- name: Build docs
run: yarn docs
- name: Checkout docs repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: 'discordjs/docs'
token: ${{ secrets.DJS_DOCS }}
path: 'out'
- name: Extract package and semver from tag
if: env.BRANCH_OR_TAG == 'tag'
if: ${{ github.ref_type == 'tag' }}
id: extract-tag
uses: ./packages/actions/src/formatTag
with:
tag: ${{ env.BRANCH_NAME }}
tag: ${{ github.ref_name }}
- name: Upload documentation to database
if: ${{ github.ref_type == 'tag' }}
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
uses: ./packages/actions/src/uploadDocumentation
with:
package: ${{ steps.extract-tag.outputs.package }}
version: ${{ steps.extract-tag.outputs.semver }}
- name: Move docs to correct directory
if: env.BRANCH_OR_TAG == 'tag'
if: ${{ github.ref_type == 'tag' }}
env:
PACKAGE: ${{ steps.extract-tag.outputs.package }}
SEMVER: ${{ steps.extract-tag.outputs.semver }}
run: |
mkdir -p out/${PACKAGE}
mv docs/${PACKAGE}/docs/docs.json out/${PACKAGE}/${SEMVER}.json
mkdir -p "out/${PACKAGE}"
if [[ "${PACKAGE}" == "discord.js" ]]; then
mv "packages/${PACKAGE}/docs/docs.json" "out/${PACKAGE}/${SEMVER}.json"
else
mv "packages/${PACKAGE}/docs/docs.api.json" "out/${PACKAGE}/${SEMVER}.api.json"
fi
- name: Upload documentation to database
if: ${{ github.ref_type == 'branch' }}
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
uses: ./packages/actions/src/uploadDocumentation
- name: Move docs to correct directory
if: env.BRANCH_OR_TAG == 'branch'
env:
PACKAGE: ${{ matrix.package }}
if: ${{ github.ref_type == 'branch' }}
run: |
mkdir -p out/${PACKAGE}
mv docs/${PACKAGE}/docs/docs.json out/${PACKAGE}/${BRANCH_NAME}.json
declare -a PACKAGES=("brokers" "builders" "collection" "core" "discord.js" "next" "formatters" "proxy" "rest" "util" "voice" "ws")
for PACKAGE in "${PACKAGES[@]}"; do
if [[ "${PACKAGE}" == "discord.js" ]]; then
mkdir -p "out/${PACKAGE}"
mv "packages/${PACKAGE}/docs/docs.json" "out/${PACKAGE}/${GITHUB_REF_NAME}.json"
else
mkdir -p "out/${PACKAGE}"
mv "packages/${PACKAGE}/docs/docs.api.json" "out/${PACKAGE}/${GITHUB_REF_NAME}.api.json"
fi
done
- name: Commit and push
run: |
@@ -137,5 +112,5 @@ jobs:
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git add .
git commit -m "Docs build for ${BRANCH_OR_TAG} ${BRANCH_NAME}: ${SHA}" || true
git commit -m "Docs build for ${GITHUB_REF_TYPE} ${GITHUB_REF_NAME}: ${GITHUB_SHA}" || true
git push

14
.github/workflows/issue-triage.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
name: 'Issue Labeler'
on:
issues:
types: [opened]
jobs:
issue-triage:
runs-on: ubuntu-latest
steps:
- uses: github/issue-labeler@v3.1
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
configuration-path: .github/issue-labeler.yml
not-before: 2023-01-13T10:25:03.847Z
enable-versioned-regex: 0

View File

@@ -1,4 +1,4 @@
name: Label Sync
name: Label sync
on:
schedule:
- cron: '0 0 * * *'
@@ -9,14 +9,15 @@ on:
paths:
- '.github/labels.yml'
jobs:
labelsync:
label-sync:
name: Label sync
runs-on: ubuntu-latest
if: github.repository_owner == 'discordjs'
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Label sync
uses: crazy-max/ghaction-github-labeler@v3
uses: crazy-max/ghaction-github-labeler@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

20
.github/workflows/lighthouse-main.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: 'Lighthouse Audit (main)'
on:
workflow_dispatch:
jobs:
lighthouse_audit_main:
name: 'Lighthouse Audit (main)'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Audit production URLs with Lighthouse
id: lighthouse_audit
uses: treosh/lighthouse-ci-action@v9
with:
urls: |
https://discordjs.dev
https://guide.discordjs.dev
uploadArtifacts: true
temporaryPublicStorage: true

88
.github/workflows/lighthouse.yml vendored Normal file
View File

@@ -0,0 +1,88 @@
name: 'Lighthouse Audit'
on:
issue_comment:
types: [created, edited]
jobs:
lighthouse_audit:
name: 'Lighthouse Audit'
if: ${{ github.event.issue.pull_request }}
runs-on: ubuntu-latest
steps:
- name: Get Vercel preview URL
id: get_preview_url
uses: actions/github-script@v6
with:
script: |
const comment = context.payload.comment;
const regex = /https:\/\/[a-z0-9-]+\.vercel\.app/g;
const matches = comment.body.match(regex);
let previewUrl = "";
if (matches && matches.length) {
previewUrl = matches[0];
console.log('Preview url found:', previewUrl);
}
console.log("No preview url found.");
core.setOutput('vercel_preview_url', previewUrl);
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Add comment to PR
if: ${{ steps.get_preview_url.outputs.vercel_preview_url != '' }}
id: loading_comment_to_pr
uses: marocchino/sticky-pull-request-comment@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
number: ${{ github.event.issue.number }}
header: lighthouse
message: |
Running Lighthouse audit...
- name: Checkout repository
if: ${{ steps.get_preview_url.outputs.vercel_preview_url != '' }}
uses: actions/checkout@v3
- name: Audit preview URL with Lighthouse
if: ${{ steps.get_preview_url.outputs.vercel_preview_url != '' }}
id: lighthouse_audit
uses: treosh/lighthouse-ci-action@v9
with:
urls: |
${{ steps.get_preview_url.outputs.vercel_preview_url }}
uploadArtifacts: true
temporaryPublicStorage: true
- name: Format lighthouse score
if: ${{ steps.get_preview_url.outputs.vercel_preview_url != '' }}
id: format_lighthouse_score
uses: actions/github-script@v6
with:
script: |
const result = ${{ steps.lighthouse_audit.outputs.manifest }}[0].summary
const links = ${{ steps.lighthouse_audit.outputs.links }}
const formatResult = (res) => Math.round((res * 100))
Object.keys(result).forEach(key => result[key] = formatResult(result[key]))
const score = res => res >= 90 ? '🟢' : res >= 50 ? '🟠' : '🔴'
const comment = [
`⚡️ [Lighthouse report](${Object.values(links)[0]}) for the changes in this PR:`,
'| Category | Score |',
'| --- | --- |',
`| ${score(result.performance)} Performance | ${result.performance} |`,
`| ${score(result.accessibility)} Accessibility | ${result.accessibility} |`,
`| ${score(result['best-practices'])} Best practices | ${result['best-practices']} |`,
`| ${score(result.seo)} SEO | ${result.seo} |`,
`| ${score(result.pwa)} PWA | ${result.pwa} |`,
' ',
`*Lighthouse ran on [${Object.keys(links)[0]}](${Object.keys(links)[0]})*`
].join('\n')
core.setOutput("comment", comment);
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Add comment to PR
if: ${{ steps.get_preview_url.outputs.vercel_preview_url != '' }}
id: comment_to_pr
uses: marocchino/sticky-pull-request-comment@v2
with:
number: ${{ github.event.issue.number }}
header: lighthouse
message: |
${{ steps.format_lighthouse_score.outputs.comment }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

19
.github/workflows/lock.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: Lock Ancient Issues
on:
schedule:
- cron: '0 16 * * *'
workflow_dispatch:
permissions:
issues: write
concurrency:
group: lock
jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
issue-inactive-days: 365
issue-lock-reason: resolved
process-only: issues

View File

@@ -1,28 +1,26 @@
name: npm auto deprecate
on:
workflow_dispatch:
schedule:
- cron: '0 1 * * *'
workflow_dispatch:
jobs:
auto-deprecate:
npm-auto-deprecate:
name: npm auto deprecate
runs-on: ubuntu-latest
if: github.repository_owner == 'discordjs'
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install node.js v16
uses: actions/setup-node@v2
- name: Install node.js v18
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: yarn.lock
node-version: 18
- name: Install dependencies
run: yarn --immutable
uses: ./packages/actions/src/yarnCache
- name: Deprecate versions
run: 'yarn npm-deprecate --name "*dev*" --package @discordjs/builders @discordjs/collection discord.js @discordjs/rest @discordjs/voice'
run: 'yarn npm-deprecate --name "*dev*" --package @discordjs/brokers @discordjs/builders @discordjs/collection @discordjs/core @discordjs/formatters discord.js @discordjs/next @discordjs/proxy @discordjs/rest @discordjs/util @discordjs/voice @discordjs/ws'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

View File

@@ -1,16 +0,0 @@
name: 'PR Automation'
on:
pull_request_target:
jobs:
triage:
runs-on: ubuntu-latest
steps:
- name: Automatically label PR
uses: actions/labeler@v3
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
sync-labels: true
- name: Automatically assign reviewers
if: github.event.action == 'opened'
uses: kentaro-m/auto-assign-action@v1.2.1

13
.github/workflows/pr-triage.yml vendored Normal file
View File

@@ -0,0 +1,13 @@
name: 'PR Triage'
on:
pull_request_target:
jobs:
pr-triage:
name: PR Triage
runs-on: ubuntu-latest
steps:
- name: Automatically label PR
uses: actions/labeler@v4
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
sync-labels: true

View File

@@ -0,0 +1,33 @@
name: Publish dev docker images
on:
schedule:
- cron: '0 */12 * * *'
workflow_dispatch:
jobs:
docker-publish:
name: Docker publish
runs-on: ubuntu-latest
if: github.repository_owner == 'discordjs'
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install node.js v18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
uses: ./packages/actions/src/yarnCache
- name: Build dependencies
run: yarn build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
run: echo ${{ secrets.DOCKER_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: Build & push docker image
run: yarn docker build --buildkit @discordjs/proxy-container -t discordjs/proxy:latest --push

View File

@@ -1,75 +1,65 @@
name: Publish dev
on:
workflow_dispatch:
schedule:
- cron: '0 */12 * * *'
workflow_dispatch:
jobs:
npm:
name: npm
npm-publish:
name: npm publish
strategy:
fail-fast: false
matrix:
include:
- package: '@discordjs/brokers'
folder: 'brokers'
- package: '@discordjs/builders'
folder: 'builders'
- package: '@discordjs/collection'
folder: 'collection'
- package: '@discordjs/core'
folder: 'core'
- package: '@discordjs/formatters'
folder: 'formatters'
- package: 'discord.js'
folder: 'discord.js'
- package: '@discordjs/next'
folder: 'next'
- package: '@discordjs/proxy'
folder: 'proxy'
- package: '@discordjs/rest'
folder: 'rest'
- package: '@discordjs/util'
folder: 'util'
- package: '@discordjs/voice'
folder: 'voice'
- package: '@discordjs/ws'
folder: 'ws'
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
if: github.repository_owner == 'discordjs'
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install node.js v16
uses: actions/setup-node@v2
uses: actions/checkout@v3
with:
node-version: 16
fetch-depth: 0
- name: Install node.js v18
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
cache: 'yarn'
cache-dependency-path: yarn.lock
- name: Turbo cache
id: turbo-cache
uses: actions/cache@v2
with:
path: .turbo
key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ github.sha }}
restore-keys: |
turbo-${{ github.job }}-${{ github.ref_name }}-
- name: Check previous released version
id: pre-release
run: |
if [[ $(npm view ${{ matrix.package }}@dev version | grep -e "$(jq --raw-output '.version' packages/${{ matrix.folder }}/package.json)\..*-$(git rev-parse --short HEAD)") ]]; \
then echo '::set-output name=release::false'; \
else echo '::set-output name=release::true'; fi
- name: Install dependencies
if: steps.pre-release.outputs.release == 'true'
run: yarn --immutable
uses: ./packages/actions/src/yarnCache
- name: Build dependencies
if: steps.pre-release.outputs.release == 'true'
run: yarn build --cache-dir=".turbo"
run: yarn build
- name: Deprecate old versions
if: steps.pre-release.outputs.release == 'true'
run: npm deprecate ${{ matrix.package }}@"~$(jq --raw-output '.version' packages/${{ matrix.folder }}/package.json)" "no longer supported" || true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Publish
if: steps.pre-release.outputs.release == 'true'
- name: Publish package
run: |
yarn workspace ${{ matrix.package }} version $(jq --raw-output '.version' packages/${{ matrix.folder }}/package.json).$(date +%s)-$(git rev-parse --short HEAD)
yarn workspace ${{ matrix.package }} release --preid "dev.$(date +%s)-$(git rev-parse --short HEAD)"
yarn workspace ${{ matrix.package }} npm publish --tag dev || true
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

30
.github/workflows/publish-docker.yml vendored Normal file
View File

@@ -0,0 +1,30 @@
name: Publish docker images
on:
workflow_dispatch:
jobs:
docker-publish:
name: Docker publish
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install node.js v18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
uses: ./packages/actions/src/yarnCache
- name: Build dependencies
run: yarn build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
run: echo ${{ secrets.DOCKER_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: Build & push docker image
run: yarn docker build --buildkit @discordjs/proxy-container -t discordjs/proxy:$(cut -d '.' -f1 <<< $(jq --raw-output '.version' packages/proxy-container/package.json)) --push

39
.github/workflows/publish-release.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: Publish Release
on:
release:
types: [released]
jobs:
npm-publish:
name: npm publish
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
if: github.repository_owner == 'discordjs'
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install node.js v18
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- name: Install dependencies
uses: ./packages/actions/src/yarnCache
- name: Build dependencies
run: yarn build
- name: Extract package and semver from tag
id: extract-tag
uses: ./packages/actions/src/formatTag
with:
tag: ${{ github.ref_name }}
- name: Publish package
run: |
yarn workspace ${{ steps.extract-tag.outputs.subpackage == 'true' && '@discordjs/' || '' }}${{ steps.extract-tag.outputs.package }} npm publish
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

View File

@@ -1,37 +0,0 @@
name: Tests
on: [push, pull_request]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install node.js v16
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: yarn.lock
- name: Turbo cache
id: turbo-cache
uses: actions/cache@v2
with:
path: .turbo
key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ github.sha }}
restore-keys: |
turbo-${{ github.job }}-${{ github.ref_name }}-
- name: Install dependencies
run: yarn --immutable
- name: ESLint
run: yarn lint --cache-dir=".turbo"
- name: Tests
run: yarn test --cache-dir=".turbo"
- name: Build
run: yarn build --cache-dir=".turbo"

64
.github/workflows/tests.yml vendored Normal file
View File

@@ -0,0 +1,64 @@
name: Tests
on:
push:
pull_request:
concurrency:
# Group based on workflow name and PR if it exists, if no PR, let it run so carryforward flags work
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install node.js v18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
uses: ./packages/actions/src/yarnCache
- name: Build dependencies (PR)
if: ${{ github.event_name != 'push' }}
run: yarn build --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]"
- name: Build dependencies (Push)
if: ${{ github.event_name == 'push' }}
run: yarn build --filter="...[HEAD^1]"
- name: ESLint (PR)
if: ${{ github.event_name != 'push' }}
run: yarn lint --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]" -- --format=compact
- name: ESLint (Push)
if: ${{ github.event_name == 'push' }}
run: yarn lint --filter="...[HEAD^1]" -- --format=compact
- name: Tests (PR)
if: ${{ github.event_name != 'push' }}
run: yarn test --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]"
- name: Tests (Push)
if: ${{ github.event_name == 'push' }}
run: yarn test --filter="...[HEAD^1]"
- name: Docs (PR)
if: ${{ github.event_name != 'push' }}
run: yarn docs --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]"
- name: Docs (Push)
if: ${{ github.event_name == 'push' }}
run: yarn docs --filter="...[HEAD^1]"
- name: Upload Coverage
if: github.repository_owner == 'discordjs'
uses: ./packages/actions/src/uploadCoverage

20
.gitignore vendored
View File

@@ -1,8 +1,8 @@
# Packages
node_modules/
node_modules
# Log files
logs/
logs
*.log
npm-debug.log*
@@ -15,17 +15,20 @@ pids
.env
# Dist
dist/
dist
dist-docs
# Miscellaneous
.tmp/
.vscode/*
.tmp
.vscode
!.vscode/extensions.json
!.vscode/settings.json
.idea/
.idea
.DS_Store
.turbo
tsconfig.tsbuildinfo
coverage
out
# yarn
.pnp.*
@@ -35,3 +38,8 @@ tsconfig.tsbuildinfo
!.yarn/releases
!.yarn/sdks
!.yarn/versions
# Cache
.prettiercache
.eslintcache
.vercel

View File

@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn format
yarn build:affected && yarn lint-staged

5
.lintstagedrc.json Normal file
View File

@@ -0,0 +1,5 @@
{
"*": "prettier --ignore-unknown --write",
"{src/**,__tests__/**}.{mjs,js,cjs,ts,tsx}": "eslint --ext .mjs,.js,.cjs,.ts,.tsx --fix",
"src/**.ts": "vitest related --run --config ../../vitest.config.ts"
}

2
.prettierignore Normal file
View File

@@ -0,0 +1,2 @@
CODEOWNERS
CHANGELOG.md

View File

@@ -7,6 +7,8 @@
"codezombiech.gitignore",
"eamodio.gitlens",
"christian-kohler.npm-intellisense",
"christian-kohler.path-intellisense"
"christian-kohler.path-intellisense",
"antfu.unocss",
"unifiedjs.vscode-mdx"
]
}

14
.vscode/settings.json vendored
View File

@@ -1,12 +1,18 @@
{
"eslint.workingDirectories": [{ "pattern": "./packages/*" }],
"eslint.workingDirectories": [{ "pattern": "./apps/*" }, { "pattern": "./packages/*" }],
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.organizeImports": false
},
"files.exclude": {
"**/node_modules": true
}
"editor.trimAutoWhitespace": false,
"files.associations": {
"*.mdx": "markdown"
},
"files.insertFinalNewline": true,
"files.eol": "\n",
"npm.packageManager": "yarn",
"typescript.tsdk": "node_modules/typescript/lib"
}

View File

@@ -0,0 +1,14 @@
diff --git a/lib/TSDocConfigFile.js b/lib/TSDocConfigFile.js
index caf3515d60fd386c5909db5a0aa8b4180b10d602..5f7cfed7611e3fe660b5265ff99c5da0beb7caec 100644
--- a/lib/TSDocConfigFile.js
+++ b/lib/TSDocConfigFile.js
@@ -31,8 +31,7 @@ const ajv_1 = __importDefault(require("ajv"));
const jju = __importStar(require("jju"));
const ajv = new ajv_1.default({ verbose: true });
function initializeSchemaValidator() {
- const jsonSchemaPath = resolve.sync('@microsoft/tsdoc/schemas/tsdoc.schema.json', { basedir: __dirname });
- const jsonSchemaContent = fs.readFileSync(jsonSchemaPath).toString();
+ const jsonSchemaContent = '{\"title\":\"TSDoc Configuration\",\"description\":\"Describes the TSDoc configuration for a TypeScript project\",\"type\":\"object\",\"properties\":{\"$schema\":{\"description\":\"Part of the JSON Schema standard, this optional keyword declares the URL of the schema that the file conforms to. Editors may download the schema and use it to perform syntax highlighting.\",\"type\":\"string\"},\"extends\":{\"description\":\"Optionally specifies one or more JSON config files that will be combined with this file. This provides a way for standard settings to be shared across multiple projects. Important: The \\\"extends\\\" paths are resolved using NodeJS module resolution, so a path to a local file MUST be prefixed with \\\".\/\\\".\",\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"noStandardTags\":{\"description\":\"By default, the config file loader will predefine all of the standardized TSDoc tags. To disable this and start with a completely empty configuration, set \\\"noStandardTags\\\"=true.\",\"type\":\"boolean\"},\"tagDefinitions\":{\"description\":\"Additional tags to support when parsing documentation comments with TSDoc.\",\"type\":\"array\",\"items\":{\"$ref\":\"#\/definitions\/tsdocTagDefinition\"}},\"supportedHtmlElements\":{\"description\":\"The HTML element names that are supported in this configuration. Used in conjunction with the \\\"reportUnsupportedHtmlElements\\\" setting.\",\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[a-zA-Z0-9-]+$\"}},\"reportUnsupportedHtmlElements\":{\"description\":\"Whether an error should be reported when an unsupported HTML element is encountered in a doc comment. Defaults to \\\"true\\\" if the \\\"supportedHtmlElements\\\" field is present in this file, \\\"false\\\" if not.\",\"type\":\"boolean\"},\"supportForTags\":{\"description\":\"A collection of key\/value pairs. The key is a TSDoc tag name (e.g. \\\"@myTag\\\") that must be defined in this configuration. The value is a boolean indicating whether the tag is supported. The TSDoc parser may report warnings when unsupported tags are encountered. If \\\"supportForTags\\\" is specified for at least one tag, then the \\\"reportUnsupportedTags\\\" validation check is enabled by default.\",\"type\":\"object\",\"patternProperties\":{\"@[a-zA-Z][a-zA-Z0-9]*$\":{\"type\":\"boolean\"}},\"additionalItems\":false}},\"required\":[\"$schema\"],\"additionalProperties\":false,\"definitions\":{\"tsdocTagDefinition\":{\"description\":\"Configuration for a custom supported TSDoc tag.\",\"type\":\"object\",\"properties\":{\"tagName\":{\"description\":\"Name of the custom tag. TSDoc tag names start with an at-sign (@) followed by ASCII letters using camelCase capitalization.\",\"type\":\"string\"},\"syntaxKind\":{\"description\":\"Syntax kind of the custom tag. \\\"inline\\\" means that this tag can appear inside other documentation sections (example: {@link}). \\\"block\\\" means that this tag starts a new documentation section (example: @remarks). \\\"modifier\\\" means that this tag\'s presence indicates an aspect of the associated API item (example: @internal).\",\"type\":\"string\",\"enum\":[\"inline\",\"block\",\"modifier\"]},\"allowMultiple\":{\"description\":\"If true, then this tag may appear multiple times in a doc comment. By default, a tag may only appear once.\",\"type\":\"boolean\"}},\"required\":[\"tagName\",\"syntaxKind\"],\"additionalProperties\":false}}}';
const jsonSchema = jju.parse(jsonSchemaContent, { mode: 'cjson' });
return ajv.compile(jsonSchema);
}

View File

@@ -0,0 +1,18 @@
diff --git a/package.json b/package.json
index fc35658a40f9ba3e3513c459ba9f4f6e1b3f59f5..bc35eda66f270c95ba52e721cb6976fd61622c58 100644
--- a/package.json
+++ b/package.json
@@ -26,11 +26,13 @@
},
"exports": {
".": {
+ "types": "./dist/index.d.ts",
"node": "./dist/index.js",
"default": "./browser/index.js"
},
"./package.json": "./package.json",
"./util": {
+ "types": "./dist/util.d.ts",
"node": "./dist/util.js",
"default": "./browser/dist/util.js"
}

View File

@@ -0,0 +1,260 @@
/* eslint-disable */
module.exports = {
name: '@yarnpkg/plugin-docker-build',
factory: function (require) {
var plugin;
(() => {
'use strict';
var t = {
d: (e, o) => {
for (var r in o) t.o(o, r) && !t.o(e, r) && Object.defineProperty(e, r, { enumerable: !0, get: o[r] });
},
o: (t, e) => Object.prototype.hasOwnProperty.call(t, e),
r: (t) => {
'undefined' != typeof Symbol &&
Symbol.toStringTag &&
Object.defineProperty(t, Symbol.toStringTag, { value: 'Module' }),
Object.defineProperty(t, '__esModule', { value: !0 });
},
},
e = {};
t.r(e), t.d(e, { default: () => u });
const o = require('@yarnpkg/cli'),
r = require('clipanion'),
i = require('@yarnpkg/core'),
a = require('@yarnpkg/plugin-patch'),
n = require('@yarnpkg/fslib');
const s = require('@yarnpkg/plugin-pack');
async function c({ workspace: t, destination: e, report: o }) {
await s.packUtils.prepareForPack(t, { report: o }, async () => {
const r = await s.packUtils.genPackList(t),
a = i.Report.progressViaCounter(r.length),
c = o.reportProgress(a);
try {
for (const i of r) {
const r = n.ppath.join(t.cwd, i),
s = n.ppath.join(e, t.relativeCwd, i);
o.reportInfo(null, i), await n.xfs.copyPromise(s, r, { overwrite: !0 }), a.tick();
}
} finally {
c.stop();
}
});
}
function p(t, e) {
const o = (0, n.toFilename)(e);
return n.ppath.isAbsolute(o) ? n.ppath.relative(t, o) : o;
}
const l = /^builtin<([^>]+)>$/;
var d = function (t, e, o, r) {
var i,
a = arguments.length,
n = a < 3 ? e : null === r ? (r = Object.getOwnPropertyDescriptor(e, o)) : r;
if ('object' == typeof Reflect && 'function' == typeof Reflect.decorate) n = Reflect.decorate(t, e, o, r);
else
for (var s = t.length - 1; s >= 0; s--)
(i = t[s]) && (n = (a < 3 ? i(n) : a > 3 ? i(e, o, n) : i(e, o)) || n);
return a > 3 && n && Object.defineProperty(e, o, n), n;
};
class f extends o.BaseCommand {
constructor() {
super(...arguments), (this.args = []);
}
async execute() {
const t = await i.Configuration.find(this.context.cwd, this.context.plugins),
{ project: e } = await i.Project.find(t, this.context.cwd),
o = e.getWorkspaceByIdent(i.structUtils.parseIdent(this.workspaceName)),
r = (function ({
project: t,
workspaces: e,
production: o = !1,
scopes: r = o ? ['dependencies'] : i.Manifest.hardDependencies,
}) {
const a = new Set([...e]);
for (const e of a)
for (const o of r) {
const r = e.manifest.getForScope(o).values();
for (const e of r) {
const o = t.tryWorkspaceByDescriptor(e);
o && a.add(o);
}
}
for (const e of t.workspaces)
a.has(e)
? o && e.manifest.devDependencies.clear()
: (e.manifest.dependencies.clear(),
e.manifest.devDependencies.clear(),
e.manifest.peerDependencies.clear());
return a;
})({ project: e, workspaces: [o], production: this.production }),
s = await (async function (t, e = 'Dockerfile') {
const o = (0, n.toFilename)(e);
if (n.ppath.isAbsolute(o)) return o;
const r = [n.ppath.join(t.cwd, o), n.ppath.join(t.project.cwd, o)];
for (const t of r) if (await n.xfs.existsPromise(t)) return t;
throw new Error('Dockerfile is required');
})(o, this.dockerFilePath),
d = await i.Cache.find(t);
return (
await i.StreamReport.start(
{ configuration: t, stdout: this.context.stdout, includeLogs: !this.context.quiet },
async (t) => {
await t.startTimerPromise('Resolution Step', async () => {
await e.resolveEverything({ report: t, cache: d });
}),
await t.startTimerPromise('Fetch Step', async () => {
await e.fetchEverything({ report: t, cache: d });
}),
await n.xfs.mktempPromise(async (o) => {
const f = n.ppath.join(o, (0, n.toFilename)('manifests')),
u = n.ppath.join(o, (0, n.toFilename)('packs'));
await t.startTimerPromise('Copy files', async () => {
await (async function ({ destination: t, project: e, report: o }) {
const r = e.configuration.get('rcFilename');
o.reportInfo(null, r),
await n.xfs.copyPromise(n.ppath.join(t, r), n.ppath.join(e.cwd, r), { overwrite: !0 });
})({ destination: f, project: e, report: t }),
await (async function ({ destination: t, project: e, report: o }) {
const r = n.ppath.join((0, n.toFilename)('.yarn'), (0, n.toFilename)('plugins'));
o.reportInfo(null, r),
await n.xfs.copyPromise(n.ppath.join(t, r), n.ppath.join(e.cwd, r), { overwrite: !0 });
})({ destination: f, project: e, report: t }),
await (async function ({ destination: t, project: e, report: o }) {
const r = e.configuration.get('yarnPath'),
i = n.ppath.relative(e.cwd, r),
a = n.ppath.join(t, i);
o.reportInfo(null, i), await n.xfs.copyPromise(a, r, { overwrite: !0 });
})({ destination: f, project: e, report: t }),
await (async function ({ destination: t, workspaces: e, report: o }) {
for (const r of e) {
const e = n.ppath.join(r.relativeCwd, i.Manifest.fileName),
a = n.ppath.join(t, e),
s = {};
r.manifest.exportTo(s),
o.reportInfo(null, e),
await n.xfs.mkdirpPromise(n.ppath.dirname(a)),
await n.xfs.writeJsonPromise(a, s);
}
})({ destination: f, workspaces: e.workspaces, report: t }),
await (async function ({ destination: t, report: e, project: o, parseDescriptor: r }) {
const a = new Set();
for (const s of o.storedDescriptors.values()) {
const c = r(
i.structUtils.isVirtualDescriptor(s) ? i.structUtils.devirtualizeDescriptor(s) : s,
);
if (!c) continue;
const { parentLocator: p, paths: d } = c;
for (const r of d) {
if (l.test(r)) continue;
if (n.ppath.isAbsolute(r)) continue;
const i = o.getWorkspaceByLocator(p),
s = n.ppath.join(i.relativeCwd, r);
if (a.has(s)) continue;
a.add(s);
const c = n.ppath.join(i.cwd, r),
d = n.ppath.join(t, s);
e.reportInfo(null, s),
await n.xfs.mkdirpPromise(n.ppath.dirname(d)),
await n.xfs.copyFilePromise(c, d);
}
}
})({
destination: f,
report: t,
project: e,
parseDescriptor: (t) => {
if (t.range.startsWith('exec:')) {
const e = (function (t) {
const { params: e, selector: o } = i.structUtils.parseRange(t),
r = n.npath.toPortablePath(o);
return {
parentLocator:
e && 'string' == typeof e.locator ? i.structUtils.parseLocator(e.locator) : null,
path: r,
};
})(t.range);
if (!e || !e.parentLocator) return;
return { parentLocator: e.parentLocator, paths: [e.path] };
}
if (t.range.startsWith('patch:')) {
const { parentLocator: e, patchPaths: o } = a.patchUtils.parseDescriptor(t);
if (!e) return;
return { parentLocator: e, paths: o };
}
},
}),
await (async function ({ destination: t, project: e, cache: o, report: r }) {
for (const i of o.markedFiles) {
const o = n.ppath.relative(e.cwd, i);
(await n.xfs.existsPromise(i)) &&
(r.reportInfo(null, o), await n.xfs.copyPromise(n.ppath.join(t, o), i));
}
})({ destination: f, project: e, cache: d, report: t }),
await (async function ({ destination: t, project: e, report: o }) {
const r = (0, n.toFilename)(e.configuration.get('lockfileFilename')),
i = n.ppath.join(t, r);
o.reportInfo(null, r),
await n.xfs.mkdirpPromise(n.ppath.dirname(i)),
await n.xfs.writeFilePromise(i, e.generateLockfile());
})({ destination: f, project: e, report: t }),
this.copyFiles &&
this.copyFiles.length &&
(await (async function ({ destination: t, files: e, dockerFilePath: o, report: r }) {
const i = n.ppath.dirname(o);
for (const o of e) {
const e = p(i, o),
a = n.ppath.join(i, e),
s = n.ppath.join(t, e);
r.reportInfo(null, e), await n.xfs.copyPromise(s, a);
}
})({ destination: f, files: this.copyFiles, dockerFilePath: s, report: t }));
});
for (const e of r) {
const o = e.manifest.name ? i.structUtils.stringifyIdent(e.manifest.name) : '';
await t.startTimerPromise('Pack workspace ' + o, async () => {
await c({ workspace: e, report: t, destination: u });
});
}
const h = this.buildKit ? ['buildx', 'build'] : ['build'];
await i.execUtils.pipevp('docker', [...h, ...this.args, '-f', s, '.'], {
cwd: o,
strict: !0,
stdin: this.context.stdin,
stdout: this.context.stdout,
stderr: this.context.stderr,
});
});
},
)
).exitCode();
}
}
(f.usage = r.Command.Usage({
category: 'Docker-related commands',
description: 'Build a Docker image for a workspace',
details:
'\n This command will build a efficient Docker image which only contains necessary dependencies for the specified workspace.\n\n You have to create a Dockerfile in your workspace or your project. You can also specify the path to Dockerfile using the "-f, --file" option.\n\n Additional arguments can be passed to "docker build" directly, please check the Docker docs for more info: https://docs.docker.com/engine/reference/commandline/build/\n\n You can copy additional files or folders to a Docker image using the "--copy" option. This is useful for secret keys or configuration files. The files will be copied to "manifests" folder. The path can be either a path relative to the Dockerfile or an absolute path.\n ',
examples: [
['Build a Docker image for a workspace', 'yarn docker build @foo/bar'],
['Pass additional arguments to docker build command', 'yarn docker build @foo/bar -t image-tag'],
[
'Copy additional files to a Docker image',
'yarn docker build --copy secret.key --copy config.json @foo/bar',
],
['Install production dependencies only', 'yarn docker build --production @foo/bar'],
['Build a Docker image using BuildKit', 'yarn docker build --buildkit @foo/bar'],
],
})),
d([r.Command.String()], f.prototype, 'workspaceName', void 0),
d([r.Command.Proxy()], f.prototype, 'args', void 0),
d([r.Command.String('-f,--file')], f.prototype, 'dockerFilePath', void 0),
d([r.Command.Array('--copy')], f.prototype, 'copyFiles', void 0),
d([r.Command.Boolean('--production')], f.prototype, 'production', void 0),
d([r.Command.Boolean('--buildkit')], f.prototype, 'buildKit', void 0),
d([r.Command.Path('docker', 'build')], f.prototype, 'execute', null);
const u = { commands: [f] };
plugin = e;
})();
return plugin;
},
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

874
.yarn/releases/yarn-3.6.1.cjs vendored Executable file

File diff suppressed because one or more lines are too long

View File

@@ -1,11 +1,23 @@
logFilters:
- code: YN0002
level: discard
- code: YN0013
level: discard
- code: YN0032
level: discard
- code: YN0060
level: discard
nodeLinker: node-modules
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
spec: '@yarnpkg/plugin-interactive-tools'
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"
spec: '@yarnpkg/plugin-workspace-tools'
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: "@yarnpkg/plugin-version"
spec: '@yarnpkg/plugin-version'
- path: .yarn/plugins/@yarnpkg/plugin-docker-build.cjs
spec: 'https://github.com/Dcard/yarn-plugins/releases/latest/download/plugin-docker-build.js'
yarnPath: .yarn/releases/yarn-3.2.1.cjs
yarnPath: .yarn/releases/yarn-3.6.1.cjs

191
LICENSE Normal file
View File

@@ -0,0 +1,191 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
Copyright 2021 Noel Buechler
Copyright 2015 Amish Shah
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

176
README.md
View File

@@ -1,127 +1,87 @@
<div align="center">
<br />
<p>
<a href="https://discord.js.org"><img src="https://discord.js.org/static/logo.svg" width="546" alt="discord.js" /></a>
</p>
<br />
<p>
<a href="https://discord.gg/djs"><img src="https://img.shields.io/discord/222078108977594368?color=5865F2&logo=discord&logoColor=white" alt="Discord server" /></a>
<a href="https://www.npmjs.com/package/discord.js"><img src="https://img.shields.io/npm/v/discord.js.svg?maxAge=3600" alt="npm version" /></a>
<a href="https://www.npmjs.com/package/discord.js"><img src="https://img.shields.io/npm/dt/discord.js.svg?maxAge=3600" alt="npm downloads" /></a>
<a href="https://github.com/discordjs/discord.js/actions"><img src="https://github.com/discordjs/discord.js/actions/workflows/test.yml/badge.svg" alt="Tests status" /></a>
</p>
<br />
<p>
<a href="https://discord.js.org"><img src="https://discord.js.org/static/logo.svg" width="546" alt="discord.js" /></a>
</p>
<br />
<p>
<a href="https://discord.gg/djs"><img src="https://img.shields.io/discord/222078108977594368?color=5865F2&logo=discord&logoColor=white" alt="Discord server" /></a>
<a href="https://www.npmjs.com/package/discord.js"><img src="https://img.shields.io/npm/v/discord.js.svg?maxAge=3600" alt="npm version" /></a>
<a href="https://www.npmjs.com/package/discord.js"><img src="https://img.shields.io/npm/dt/discord.js.svg?maxAge=3600" alt="npm downloads" /></a>
<a href="https://github.com/discordjs/discord.js/actions"><img src="https://github.com/discordjs/discord.js/actions/workflows/test.yml/badge.svg" alt="Tests status" /></a>
<a href="https://codecov.io/gh/discordjs/discord.js" ><img src="https://codecov.io/gh/discordjs/discord.js/branch/main/graph/badge.svg?precision=2" alt="Code coverage" /></a>
</p>
<p>
<a href="https://vercel.com/?utm_source=discordjs&utm_campaign=oss"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-vercel.svg" alt="Vercel" /></a>
<a href="https://www.cloudflare.com"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-workers.png" alt="Cloudflare Workers" height="44" /></a>
</p>
</div>
## About
discord.js is a powerful [Node.js](https://nodejs.org) module that allows you to easily interact with the
[Discord API](https://discord.com/developers/docs/intro).
This repository contains multiple packages with separate [releases][github-releases]. You can find the assembled Discord API wrapper at [`discord.js`][source]. It is a powerful [Node.js](https://nodejs.org/en) module that allows you to easily interact with the [Discord API](https://discord.com/developers/docs/intro).
- Object-oriented
- Predictable abstractions
- Performant
- 100% coverage of the Discord API
## Packages
## Installation
**Node.js 16.9.0 or newer is required.**
```sh-session
npm install discord.js
yarn add discord.js
pnpm add discord.js
```
### Optional packages
- [zlib-sync](https://www.npmjs.com/package/zlib-sync) for WebSocket data compression and inflation (`npm install zlib-sync`)
- [erlpack](https://github.com/discord/erlpack) for significantly faster WebSocket data (de)serialisation (`npm install discord/erlpack`)
- [bufferutil](https://www.npmjs.com/package/bufferutil) for a much faster WebSocket connection (`npm install bufferutil`)
- [utf-8-validate](https://www.npmjs.com/package/utf-8-validate) in combination with `bufferutil` for much faster WebSocket processing (`npm install utf-8-validate`)
- [@discordjs/voice](https://www.npmjs.com/package/@discordjs/voice) for interacting with the Discord Voice API (`npm install @discordjs/voice`)
## Example usage
Install all required dependencies:
```sh-session
npm install discord.js @discordjs/rest discord-api-types
yarn add discord.js @discordjs/rest discord-api-types
pnpm add discord.js @discordjs/rest discord-api-types
```
Register a slash command against the Discord API:
```js
const { REST } = require('@discordjs/rest');
const { Routes } = require('discord-api-types/v10');
const commands = [
{
name: 'ping',
description: 'Replies with Pong!',
},
];
const rest = new REST({ version: '10' }).setToken('token');
(async () => {
try {
console.log('Started refreshing application (/) commands.');
await rest.put(Routes.applicationGuildCommands(CLIENT_ID, GUILD_ID), { body: commands });
console.log('Successfully reloaded application (/) commands.');
} catch (error) {
console.error(error);
}
})();
```
Afterwards we can create a quite simple example bot:
```js
const { Client, GatewayIntentBits } = require('discord.js');
const client = new Client({ intents: [GatewayIntentBits.Guilds] });
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});
client.on('interactionCreate', async (interaction) => {
if (!interaction.isCommand()) return;
if (interaction.commandName === 'ping') {
await interaction.reply('Pong!');
}
});
client.login('token');
```
- `discord.js` ([source][source]) - A powerful Node.js module for interacting with the Discord API
- `@discordjs/brokers` ([source][brokers-source]) - A collection of brokers for use with discord.js
- `@discordjs/builders` ([source][builders-source]) - A utility package for easily building Discord API payloads
- `@discordjs/collection` ([source][collection-source]) - A powerful utility data structure
- `@discordjs/core` ([source][core-source]) - A thinly abstracted wrapper around the core components of the Discord API
- `@discordjs/formatters` ([source][formatters-source]) - A collection of functions for formatting strings
- `@discordjs/proxy` ([source][proxy-source]) - A wrapper around `@discordjs/rest` for running an HTTP proxy
- `@discordjs/rest` ([source][rest-source]) - A module for interacting with the Discord REST API
- `@discordjs/voice` ([source][voice-source]) - A module for interacting with the Discord Voice API
- `@discordjs/util` ([source][util-source]) - A collection of utility functions
- `@discordjs/ws` ([source][ws-source]) - A wrapper around Discord's gateway
## Links
- [Website](https://discord.js.org/) ([source](https://github.com/discordjs/website))
- [Documentation](https://discord.js.org/#/docs)
- [Guide](https://discordjs.guide/) ([source](https://github.com/discordjs/guide))
See also the [Update Guide](https://discordjs.guide/additional-info/changes-in-v13.html), including updated and removed items in the library.
- [discord.js Discord server](https://discord.gg/djs)
- [Discord API Discord server](https://discord.gg/discord-api)
- [GitHub](https://github.com/discordjs/discord.js)
- [npm](https://www.npmjs.com/package/discord.js)
- [Related libraries](https://discord.com/developers/docs/topics/community-resources#libraries)
- [Website][website] ([source][website-source])
- [Documentation][documentation]
- [Guide][guide] ([source][guide-source])
Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library.
- [discord.js Discord server][discord]
- [Discord API Discord server][discord-api]
- [GitHub][source]
- [npm][npm]
- [Related libraries][related-libs]
### Extensions
- [RPC](https://www.npmjs.com/package/discord-rpc) ([source](https://github.com/discordjs/RPC))
- [RPC][rpc] ([source][rpc-source])
## Contributing
Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the
[documentation](https://discord.js.org/#/docs).
See [the contribution guide](https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md) if you'd like to submit a PR.
Please read through our [contribution guidelines][contributing] before starting a pull request. We welcome contributions of all kinds, not just code! If you're stuck for ideas, look for the [good first issue][good-first-issue] label on issues in the repository. If you have any questions about the project, feel free to ask them on [Discord][discord]. Before creating your own issue or pull request, always check to see if one already exists! Don't rush contributions, take your time and ensure you're doing it correctly.
## Help
If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle
nudge in the right direction, please don't hesitate to join our official [discord.js Server](https://discord.gg/djs).
If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please join our [Discord server][discord].
[website]: https://discord.js.org
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
[documentation]: https://discord.js.org/docs
[guide]: https://discordjs.guide/
[guide-source]: https://github.com/discordjs/guide
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
[discord]: https://discord.gg/djs
[discord-api]: https://discord.gg/discord-api
[source]: https://github.com/discordjs/discord.js/tree/main/packages/discord.js
[npm]: https://www.npmjs.com/package/discord.js
[related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries
[rpc]: https://www.npmjs.com/package/discord-rpc
[rpc-source]: https://github.com/discordjs/RPC
[contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md
[github-releases]: https://github.com/discordjs/discord.js/releases
[brokers-source]: https://github.com/discordjs/discord.js/tree/main/packages/brokers
[builders-source]: https://github.com/discordjs/discord.js/tree/main/packages/builders
[collection-source]: https://github.com/discordjs/discord.js/tree/main/packages/collection
[core-source]: https://github.com/discordjs/discord.js/tree/main/packages/core
[formatters-source]: https://github.com/discordjs/discord.js/tree/main/packages/formatters
[proxy-source]: https://github.com/discordjs/discord.js/tree/main/packages/proxy
[rest-source]: https://github.com/discordjs/discord.js/tree/main/packages/rest
[voice-source]: https://github.com/discordjs/discord.js/tree/main/packages/voice
[util-source]: https://github.com/discordjs/discord.js/tree/main/packages/util
[ws-source]: https://github.com/discordjs/discord.js/tree/main/packages/ws
[good-first-issue]: https://github.com/discordjs/discord.js/contribute

417
api-extractor.json Normal file
View File

@@ -0,0 +1,417 @@
/**
* Config file for API Extractor. For more info, please visit: https://api-extractor.com
*/
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
/**
* Optionally specifies another JSON config file that this file extends from. This provides a way for
* standard settings to be shared across multiple projects.
*
* If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains
* the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be
* resolved using NodeJS require().
*
* SUPPORTED TOKENS: none
* DEFAULT VALUE: ""
*/
// "extends": "./shared/api-extractor-base.json"
// "extends": "my-package/include/api-extractor-base.json"
/**
* Determines the "<projectFolder>" token that can be used with other config file settings. The project folder
* typically contains the tsconfig.json and package.json config files, but the path is user-defined.
*
* The path is resolved relative to the folder of the config file that contains the setting.
*
* The default value for "projectFolder" is the token "<lookup>", which means the folder is determined by traversing
* parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder
* that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error
* will be reported.
*
* SUPPORTED TOKENS: <lookup>
* DEFAULT VALUE: "<lookup>"
*/
// "projectFolder": "..",
/**
* (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor
* analyzes the symbols exported by this module.
*
* The file extension must be ".d.ts" and not ".ts".
*
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
* prepend a folder token such as "<projectFolder>".
*
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
*/
"mainEntryPointFilePath": "<projectFolder>/dist-docs/index.d.ts",
/**
* A list of NPM package names whose exports should be treated as part of this package.
*
* For example, suppose that Webpack is used to generate a distributed bundle for the project "library1",
* and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part
* of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly
* imports library2. To avoid this, we can specify:
*
* "bundledPackages": [ "library2" ],
*
* This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been
* local files for library1.
*/
"bundledPackages": [],
/**
* Determines how the TypeScript compiler engine will be invoked by API Extractor.
*/
"compiler": {
/**
* Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project.
*
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
* prepend a folder token such as "<projectFolder>".
*
* Note: This setting will be ignored if "overrideTsconfig" is used.
*
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
* DEFAULT VALUE: "<projectFolder>/tsconfig.json"
*/
// "tsconfigFilePath": "<projectFolder>/tsconfig.json",
/**
* Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk.
* The object must conform to the TypeScript tsconfig schema:
*
* http://json.schemastore.org/tsconfig
*
* If omitted, then the tsconfig.json file will be read from the "projectFolder".
*
* DEFAULT VALUE: no overrideTsconfig section
*/
"overrideTsconfig": {
// Type Checking
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"exactOptionalPropertyTypes": true,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strict": true,
"useUnknownInCatchVariables": true,
"noUncheckedIndexedAccess": true,
// Modules
"module": "ESNext",
"moduleResolution": "node",
"resolveJsonModule": true,
// Emit
"declaration": true,
"declarationMap": true,
"importHelpers": true,
"inlineSources": true,
"newLine": "lf",
"noEmitHelpers": true,
"outDir": "dist",
"removeComments": false,
"sourceMap": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
// Language and Environment
"experimentalDecorators": true,
"lib": ["ESNext"],
"target": "ES2021",
"useDefineForClassFields": true
}
/**
* This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended
* and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when
* dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses
* for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck.
*
* DEFAULT VALUE: false
*/
// "skipLibCheck": true,
},
/**
* Configures how the API report file (*.api.md) will be generated.
*/
"apiReport": {
/**
* (REQUIRED) Whether to generate an API report.
*/
"enabled": false
/**
* The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce
* a full file path.
*
* The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/".
*
* SUPPORTED TOKENS: <packageName>, <unscopedPackageName>
* DEFAULT VALUE: "<unscopedPackageName>.api.md"
*/
// "reportFileName": "<unscopedPackageName>.api.md",
/**
* Specifies the folder where the API report file is written. The file name portion is determined by
* the "reportFileName" setting.
*
* The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy,
* e.g. for an API review.
*
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
* prepend a folder token such as "<projectFolder>".
*
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
* DEFAULT VALUE: "<projectFolder>/temp/"
*/
// "reportFolder": "<projectFolder>/temp/",
/**
* Specifies the folder where the temporary report file is written. The file name portion is determined by
* the "reportFileName" setting.
*
* After the temporary file is written to disk, it is compared with the file in the "reportFolder".
* If they are different, a production build will fail.
*
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
* prepend a folder token such as "<projectFolder>".
*
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
* DEFAULT VALUE: "<projectFolder>/temp/"
*/
// "reportTempFolder": "<projectFolder>/temp/"
},
/**
* Configures how the doc model file (*.api.json) will be generated.
*/
"docModel": {
/**
* (REQUIRED) Whether to generate a doc model file.
*/
"enabled": true,
/**
* The output path for the doc model file. The file extension should be ".api.json".
*
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
* prepend a folder token such as "<projectFolder>".
*
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
* DEFAULT VALUE: "<projectFolder>/temp/<unscopedPackageName>.api.json"
*/
"apiJsonFilePath": "<projectFolder>/docs/docs.api.json"
},
/**
* Configures how the .d.ts rollup file will be generated.
*/
"dtsRollup": {
/**
* (REQUIRED) Whether to generate the .d.ts rollup file.
*/
"enabled": true,
/**
* Specifies the output path for a .d.ts rollup file to be generated without any trimming.
* This file will include all declarations that are exported by the main entry point.
*
* If the path is an empty string, then this file will not be written.
*
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
* prepend a folder token such as "<projectFolder>".
*
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
* DEFAULT VALUE: "<projectFolder>/dist/<unscopedPackageName>.d.ts"
*/
"untrimmedFilePath": "<projectFolder>/dist-docs/index.d.ts"
/**
* Specifies the output path for a .d.ts rollup file to be generated with trimming for an "alpha" release.
* This file will include only declarations that are marked as "@public", "@beta", or "@alpha".
*
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
* prepend a folder token such as "<projectFolder>".
*
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
* DEFAULT VALUE: ""
*/
// "alphaTrimmedFilePath": "<projectFolder>/dist/<unscopedPackageName>-alpha.d.ts",
/**
* Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release.
* This file will include only declarations that are marked as "@public" or "@beta".
*
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
* prepend a folder token such as "<projectFolder>".
*
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
* DEFAULT VALUE: ""
*/
// "betaTrimmedFilePath": "<projectFolder>/dist/<unscopedPackageName>-beta.d.ts",
/**
* Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release.
* This file will include only declarations that are marked as "@public".
*
* If the path is an empty string, then this file will not be written.
*
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
* prepend a folder token such as "<projectFolder>".
*
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
* DEFAULT VALUE: ""
*/
// "publicTrimmedFilePath": "<projectFolder>/dist/<unscopedPackageName>-public.d.ts",
/**
* When a declaration is trimmed, by default it will be replaced by a code comment such as
* "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the
* declaration completely.
*
* DEFAULT VALUE: false
*/
// "omitTrimmingComments": true
},
/**
* Configures how the tsdoc-metadata.json file will be generated.
*/
"tsdocMetadata": {
/**
* Whether to generate the tsdoc-metadata.json file.
*
* DEFAULT VALUE: true
*/
// "enabled": true,
/**
* Specifies where the TSDoc metadata file should be written.
*
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
* prepend a folder token such as "<projectFolder>".
*
* The default value is "<lookup>", which causes the path to be automatically inferred from the "tsdocMetadata",
* "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup
* falls back to "tsdoc-metadata.json" in the package folder.
*
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
* DEFAULT VALUE: "<lookup>"
*/
// "tsdocMetadataFilePath": "<projectFolder>/dist/tsdoc-metadata.json"
},
/**
* Specifies what type of newlines API Extractor should use when writing output files. By default, the output files
* will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead.
* To use the OS's default newline kind, specify "os".
*
* DEFAULT VALUE: "crlf"
*/
"newlineKind": "lf",
/**
* Configures how API Extractor reports error and warning messages produced during analysis.
*
* There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages.
*/
"messages": {
/**
* Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing
* the input .d.ts files.
*
* TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551"
*
* DEFAULT VALUE: A single "default" entry with logLevel=warning.
*/
"compilerMessageReporting": {
/**
* Configures the default routing for messages that don't match an explicit rule in this table.
*/
"default": {
/**
* Specifies whether the message should be written to the the tool's output log. Note that
* the "addToApiReportFile" property may supersede this option.
*
* Possible values: "error", "warning", "none"
*
* Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail
* and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes
* the "--local" option), the warning is displayed but the build will not fail.
*
* DEFAULT VALUE: "warning"
*/
"logLevel": "warning"
/**
* When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md),
* then the message will be written inside that file; otherwise, the message is instead logged according to
* the "logLevel" option.
*
* DEFAULT VALUE: false
*/
// "addToApiReportFile": false
}
// "TS2551": {
// "logLevel": "warning",
// "addToApiReportFile": true
// },
//
// . . .
},
/**
* Configures handling of messages reported by API Extractor during its analysis.
*
* API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag"
*
* DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings
*/
"extractorMessageReporting": {
"default": {
"logLevel": "warning"
// "addToApiReportFile": false
},
// Disable the following warning:
// (ae-missing-release-tag) "x" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
"ae-missing-release-tag": {
"logLevel": "none"
}
// "ae-extra-release-tag": {
// "logLevel": "warning",
// "addToApiReportFile": true
// },
//
// . . .
},
/**
* Configures handling of messages reported by the TSDoc parser when analyzing code comments.
*
* TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text"
*
* DEFAULT VALUE: A single "default" entry with logLevel=warning.
*/
"tsdocMessageReporting": {
"default": {
"logLevel": "warning"
// "addToApiReportFile": false
}
// "tsdoc-link-tag-unescaped-text": {
// "logLevel": "warning",
// "addToApiReportFile": true
// },
//
// . . .
}
}
}

1
apps/guide/.eslintignore Normal file
View File

@@ -0,0 +1 @@
next-env.d.ts

12
apps/guide/.eslintrc.json Normal file
View File

@@ -0,0 +1,12 @@
{
"extends": ["../../.eslintrc.json", "neon/react", "neon/next", "neon/edge", "@unocss", "neon/prettier"],
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"react/react-in-jsx-scope": 0,
"react/jsx-filename-extension": [1, { "extensions": [".tsx"] }]
}
}

28
apps/guide/.gitignore vendored Normal file
View File

@@ -0,0 +1,28 @@
# Packages
node_modules
# Log files
logs
*.log
npm-debug.log*
# Runtime data
pids
*.pid
*.seed
# Env
.env
.env*.local
# Dist
.contentlayer
.next
public/searchIndex
src/styles/unocss.css
# Miscellaneous
.tmp
.vscode
lighthouse-results

View File

@@ -0,0 +1 @@
module.exports = require('../../.lintstagedrc.json');

View File

@@ -0,0 +1,7 @@
.contentlayer
.next
.turbo
.vscode
coverage
src/styles/unocss.css
next-env.d.ts

View File

@@ -0,0 +1 @@
module.exports = require('../../.prettierrc.json');

52
apps/guide/README.md Normal file
View File

@@ -0,0 +1,52 @@
<div align="center">
<br />
<p>
<a href="https://discord.js.org"><img src="https://discord.js.org/static/logo.svg" width="546" alt="discord.js" /></a>
</p>
<br />
<p>
<a href="https://discord.gg/djs"><img src="https://img.shields.io/discord/222078108977594368?color=5865F2&logo=discord&logoColor=white" alt="Discord server" /></a>
<a href="https://github.com/discordjs/discord.js/actions"><img src="https://github.com/discordjs/discord.js/actions/workflows/test.yml/badge.svg" alt="Build status" /></a>
</p>
<p>
<a href="https://vercel.com/?utm_source=discordjs&utm_campaign=oss"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-vercel.svg" alt="Vercel" /></a>
<a href="https://www.cloudflare.com"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-workers.png" alt="Cloudflare Workers" height="44" /></a>
</p>
</div>
## About
The official guide for discord.js, made to help you get started easily with the library.
## Links
- [Website][website] ([source][website-source])
- [Documentation][documentation]
- [Guide][guide] ([source][guide-source])
Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library.
- [discord.js Discord server][discord]
- [Discord API Discord server][discord-api]
- [GitHub][source]
- [Related libraries][related-libs]
## Contributing
Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the
[documentation][documentation].
See [the contribution guide][contributing] if you'd like to submit a PR.
## Help
If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord].
[website]: https://discord.js.org
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
[documentation]: https://discord.js.org/docs
[guide]: https://discordjs.guide/
[guide-source]: https://github.com/discordjs/guide
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
[discord]: https://discord.gg/djs
[discord-api]: https://discord.gg/discord-api
[source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
[related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries
[contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md

View File

@@ -0,0 +1,94 @@
import { remarkCodeHike } from '@code-hike/mdx';
import { defineDocumentType, makeSource } from 'contentlayer/source-files';
import { type Node, toString } from 'hast-util-to-string';
import { h } from 'hastscript';
import { escape } from 'html-escaper';
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
import rehypeSlug from 'rehype-slug';
import remarkGfm from 'remark-gfm';
import codeHikeThemeDarkPlus from './src/styles/code-hike-theme-dark-plus.json';
export const Content = defineDocumentType(() => ({
name: 'Content',
filePathPattern: `**/*.mdx`,
contentType: 'mdx',
fields: {
title: {
type: 'string',
required: true,
},
category: {
type: 'string',
required: true,
},
},
computedFields: {
slug: {
type: 'string',
// eslint-disable-next-line unicorn/prefer-string-replace-all
resolve: (doc) => doc._raw.flattenedPath.replace(/\d+-/g, ''),
},
url: {
type: 'string',
// eslint-disable-next-line unicorn/prefer-string-replace-all
resolve: (doc) => `/guide/${doc._raw.flattenedPath.replace(/\d+-/g, '')}`,
},
},
}));
const LinkIcon = h(
'svg',
{
width: '1.25rem',
height: '1.25rem',
viewBox: '0 0 24 24',
fill: 'none',
stroke: 'currentColor',
strokeWidth: '2',
strokeLinecap: 'round',
strokeLinejoin: 'round',
},
h('path', {
// eslint-disable-next-line id-length
d: 'M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71',
}),
h('path', {
// eslint-disable-next-line id-length
d: 'M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71',
}),
);
const createSROnlyLabel = (text: any) => {
return h('span', { class: 'sr-only' }, `Section titled ${escape(text)}`);
};
export default makeSource({
contentDirPath: 'src/content',
documentTypes: [Content],
mdx: {
remarkPlugins: [remarkGfm, [remarkCodeHike, { theme: codeHikeThemeDarkPlus, lineNumbers: true }]],
rehypePlugins: [
rehypeSlug,
[
rehypeAutolinkHeadings,
{
properties: {
class:
'relative inline-flex place-items-center place-content-center outline-none text-black dark:text-white pr-2 -ml-8 opacity-0 group-hover:opacity-100',
},
behavior: 'prepend',
content: (heading: Node) => [
h(
`span.anchor-icon`,
{
ariaHidden: 'true',
},
LinkIcon,
),
createSROnlyLabel(toString(heading)),
],
},
],
],
},
});

5
apps/guide/next-env.d.ts vendored Normal file
View File

@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.

24
apps/guide/next.config.js Normal file
View File

@@ -0,0 +1,24 @@
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable @typescript-eslint/no-require-imports */
// import bundleAnalyzer from '@next/bundle-analyzer';
// import { withContentlayer } from 'next-contentlayer';
const bundleAnalyzer = require('@next/bundle-analyzer');
const { withContentlayer } = require('next-contentlayer');
const withBundleAnalyzer = bundleAnalyzer({
enabled: process.env.ANALYZE === 'true',
});
module.exports = withBundleAnalyzer(
withContentlayer({
reactStrictMode: true,
experimental: {
appDir: true,
},
images: {
dangerouslyAllowSVG: true,
contentDispositionType: 'attachment',
contentSecurityPolicy: "default-src 'self'; frame-src 'none'; sandbox;",
},
}),
);

100
apps/guide/package.json Normal file
View File

@@ -0,0 +1,100 @@
{
"name": "@discordjs/guide",
"version": "0.1.0",
"description": "Imagine a guide... that explores the many possibilities for your discord.js bot",
"private": true,
"scripts": {
"test": "vitest run",
"test:lighthouse": "lighthouse http://localhost:3000 --output-path=./lighthouse-results",
"build:local": "yarn build:prod",
"build:prod": "yarn build:css && yarn build:next",
"build:next": "next build",
"build:css": "yarn generate:css",
"build:analyze": "cross-env ANALYZE=true yarn build:prod",
"preview": "next start",
"dev": "concurrently 'yarn dev:css' 'yarn dev:next'",
"dev:next": "next dev",
"dev:css": "yarn generate:css --watch",
"generate:css": "unocss 'src/**/*.tsx' 'contentlayer.config.ts' '../../packages/ui/src/lib/components/**/*.tsx' --out-file ./src/styles/unocss.css --config ../../unocss.config.ts",
"lint": "prettier --check . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx --format=pretty",
"format": "prettier --write . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx --fix --format=pretty",
"fmt": "yarn format"
},
"type": "commonjs",
"contributors": [
"Crawl <icrawltogo@gmail.com>"
],
"license": "Apache-2.0",
"keywords": [
"discord",
"api",
"bot",
"client",
"node",
"discordapp",
"discordjs"
],
"repository": {
"type": "git",
"url": "https://github.com/discordjs/discord.js.git",
"directory": "apps/guide"
},
"bugs": {
"url": "https://github.com/discordjs/discord.js/issues"
},
"homepage": "https://discord.js.org",
"dependencies": {
"@code-hike/mdx": "^0.9.0",
"@discordjs/ui": "workspace:^",
"@react-icons/all-files": "^4.1.0",
"@vercel/analytics": "^1.0.2",
"@vercel/edge-config": "^0.2.1",
"@vercel/og": "^0.5.11",
"ariakit": "^2.0.0-next.44",
"cmdk": "^0.2.0",
"contentlayer": "0.3.1",
"next": "^13.4.17",
"next-contentlayer": "0.3.1",
"next-themes": "^0.2.1",
"react": "^18.2.0",
"react-custom-scrollbars-2": "^4.5.0",
"react-dom": "^18.2.0",
"rehype-autolink-headings": "^6.1.1",
"rehype-slug": "^5.1.0",
"remark-gfm": "^3.0.1",
"sharp": "^0.32.5"
},
"devDependencies": {
"@next/bundle-analyzer": "^13.4.17",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"@types/html-escaper": "^3.0.0",
"@types/node": "18.17.5",
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
"@unocss/cli": "^0.55.1",
"@unocss/eslint-config": "^0.55.1",
"@unocss/reset": "^0.55.1",
"@vitejs/plugin-react": "^4.0.4",
"@vitest/coverage-v8": "^0.34.2",
"concurrently": "^8.2.0",
"cross-env": "^7.0.3",
"eslint": "^8.47.0",
"eslint-config-neon": "^0.1.47",
"eslint-formatter-pretty": "^5.0.0",
"happy-dom": "^10.10.2",
"hast-util-to-string": "^2.0.0",
"hastscript": "^7.2.0",
"html-escaper": "^3.0.3",
"lighthouse": "^10.4.0",
"prettier": "^2.8.8",
"turbo": "^1.10.12",
"typescript": "^5.1.6",
"unocss": "^0.55.1",
"vercel": "^31.4.0",
"vitest": "^0.34.2"
},
"engines": {
"node": ">=18.13.0"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="/mstile-70x70.png"/>
<square150x150logo src="/mstile-150x150.png"/>
<square310x310logo src="/mstile-310x310.png"/>
<wide310x150logo src="/mstile-310x150.png"/>
<TileColor>#090a16</TileColor>
</tile>
</msapplication>
</browserconfig>

Binary file not shown.

After

Width:  |  Height:  |  Size: 561 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="400.000000pt" height="400.000000pt" viewBox="0 0 400.000000 400.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.14, written by Peter Selinger 2001-2017
</metadata>
<g transform="translate(0.000000,400.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M0 2000 l0 -2000 2000 0 2000 0 0 2000 0 2000 -2000 0 -2000 0 0
-2000z m1305 795 c219 -47 373 -197 421 -411 24 -109 16 -315 -16 -399 l-23
-61 -59 -11 c-110 -21 -182 -92 -203 -202 -11 -56 -11 -56 -68 -79 -76 -30
-201 -42 -464 -42 l-223 0 0 610 0 610 283 0 c210 0 300 -4 352 -15z m890
-585 c0 -543 -2 -601 -18 -659 -56 -198 -190 -334 -365 -370 -176 -37 -349 5
-471 115 -48 44 -111 134 -111 161 0 6 19 14 43 18 23 4 73 18 110 32 l68 24
50 -45 c56 -50 98 -66 175 -66 100 0 207 81 234 178 6 23 10 251 10 625 l0
588 138 -3 137 -3 0 -595z m930 570 c93 -29 197 -84 252 -134 l44 -41 -61 -75
c-34 -41 -67 -81 -74 -88 -10 -10 -25 -4 -78 32 -95 63 -154 81 -268 81 -79 0
-103 -4 -142 -23 -62 -31 -90 -71 -96 -137 -8 -94 28 -137 168 -202 157 -73
172 -80 240 -108 236 -97 341 -215 356 -400 16 -193 -82 -363 -258 -449 -91
-45 -187 -66 -303 -66 -191 0 -390 74 -524 195 l-40 37 80 93 80 94 73 -53
c168 -121 353 -155 491 -92 72 33 108 82 113 155 9 122 -37 162 -323 286 -258
111 -350 179 -407 300 -69 148 -37 343 75 463 61 65 195 133 300 152 79 14
222 4 302 -20z m-1367 -977 c45 -34 65 -69 70 -125 4 -61 -19 -106 -77 -145
-90 -60 -226 3 -238 111 -3 24 -3 56 1 70 8 34 54 86 91 102 40 19 120 12 153
-13z"/>
<path d="M967 2543 c-4 -3 -7 -159 -7 -346 l0 -339 128 4 c101 3 136 8 172 24
106 48 162 145 168 292 10 214 -69 334 -238 361 -73 12 -213 15 -223 4z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1,19 @@
{
"name": "discord.js guide",
"short_name": "discord.js guide",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-384x384.png",
"sizes": "384x384",
"type": "image/png"
}
],
"theme_color": "#1a1b1e",
"background_color": "#1a1b1e",
"display": "standalone"
}

View File

@@ -0,0 +1,23 @@
'use client';
import { Providers } from './providers';
import { inter } from '~/util/fonts';
export default function GlobalError({ error }: { readonly error: Error }) {
console.error(error);
return (
<html className={inter.variable} lang="en" suppressHydrationWarning>
<body className="bg-light-600 dark:bg-dark-600 dark:text-light-900">
<Providers>
<main className="mx-auto max-w-2xl min-h-screen">
<div className="mx-auto max-w-lg min-h-screen flex flex-col place-content-center place-items-center gap-8 px-8 py-16 lg:px-6 lg:py-0">
<h1 className="text-[9rem] font-black leading-none md:text-[12rem]">500</h1>
<h2 className="text-[2rem] md:text-[3rem]">Error.</h2>
</div>
</main>
</Providers>
</body>
</html>
);
}

View File

@@ -0,0 +1,12 @@
'use client';
export default function Error({ error }: { readonly error: Error }) {
console.error(error);
return (
<div className="mx-auto max-w-lg min-h-screen flex flex-col place-content-center place-items-center gap-8 px-8 py-16 lg:px-6 lg:py-0">
<h1 className="text-[9rem] font-black leading-none md:text-[12rem]">500</h1>
<h2 className="text-[2rem] md:text-[3rem]">Error.</h2>
</div>
);
}

View File

@@ -0,0 +1 @@
export { default } from '~/app/not-found';

Some files were not shown because too many files have changed in this diff Show More