Commit Graph

7018 Commits

Author SHA1 Message Date
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