Commit Graph

1085 Commits

Author SHA1 Message Date
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
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
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
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
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
909a02e2ad ci: test changes 2022-11-25 19:57:50 +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
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
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