Commit Graph

509 Commits

Author SHA1 Message Date
Qjuh
118e682682 feat: components v2 in builders v1 (#10787)
* feat(builders): components v2 in builders v1

* feat: implemented the first components

* fix: tests

* fix: tests

* fix: export the new stuff

* feat: add rest of components

* feat: add callback syntax

* feat: callback syntax for section

* fix: missing implements

* fix: accessory property

* fix: apply suggestions from v2 PR

* chore: bring in line with builders v2

* fix: add missing type

* chore: split accessory methods

* chore: backport changes from v2 PR

* fix: accent_color is nullish

* fix: allow passing raw json to MediaGallery methods

* fix: add test

* chore: add Container#addXComponents

* fix: docs

* chore: bump discord-api-types

* Update packages/builders/src/components/Assertions.ts

Co-authored-by: Denis-Adrian Cristea <didinele.dev@gmail.com>

---------

Co-authored-by: Denis-Adrian Cristea <didinele.dev@gmail.com>
2025-04-24 21:59:58 +02:00
Jiralite
8760fde9ff build: bump discord-api-types to 0.37.113 2024-12-22 21:58:29 +00:00
Synbulat Biishev
fc0b6f7f8e feat: user-installable apps (#10227)
* feat: inital user-installable apps support

* docs: add deprecation warnings

* feat: add equality checks

* fix: possibly `null` cases

* docs: tweaks

* docs: add deprecations

* fix(ApplicationCommandManager): amend transform command

* feat: properly support `integration_types_config`

* docs: add .

* docs: minor changes

* featBaseApplicationCommandData): update type

* style: prettier

* chore: fix issues

* fix: correct casing

Co-authored-by: Superchupu <53496941+SuperchupuDev@users.noreply.github.com>

* refactor: remove console log

* fix: use case that satisfies `/core` and the API

* fix: `oauth2InstallParams` property is not nullable

* fix: do not convert keys into strings

* feat: update transforer to return the full map

* feat: update transformers

* feat: add `PartialGroupDMMessageManager `

Hope this is not a breaking change

* docs: fix type

* feat: add approximate count of users property

* fix: messageCreate doesn't emit in PartialGroupDMChannel

* fix: add GroupDM to TextBasedChannelTypes

* feat: add NonPartialGroupDMChannel helper

* fix: expect PartialGroupDMChannel

* feat: narrow generic type

* test: exclude PartialGroupDMChannel

* feat: use structure's channel type

* docs: narrow type

* feat: remove transformer

* refactor: remove unnecessary parse

* feat: add APIAutoModerationAction transformer

* fix: use the right transformer during recursive parsing of interaction metadata

* docs: add external types

* docs: add `Message#interactionMetadata` property docs

* docs: make nullable

* docs: add d-docs link

* docs: use optional

* fix: make `oauth2InstallParams` nullable

* types: update `IntegrationTypesConfiguration`

Co-authored-by: Almeida <github@almeidx.dev>

* docs: update `IntegrationTypesConfigurationParameters`

Co-authored-by: Almeida <github@almeidx.dev>

* types: update `IntegrationTypesConfigurationParameters`

* refactor: improve readability

* docs: mark integrationTypesConfig nullable

* refactor: requested changes

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Superchupu <53496941+SuperchupuDev@users.noreply.github.com>
Co-authored-by: Vlad Frangu <me@vladfrangu.dev>
Co-authored-by: Almeida <github@almeidx.dev>
2024-09-01 20:44:51 +00:00
Jaw0r3k
a5afc406b9 feat: super reactions (#9336)
* feat: super reactions

* docs: Touch-up

* feat: count super reactions in events

* feat: document me_burst property

Co-authored-by: Danial Raza <danialrazafb@gmail.com>

* feat: document type query for fetching reaction users

* fix: cover case when burstColors can be undefined at init of a reaction

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

Co-authored-by: Vlad Frangu <me@vladfrangu.dev>

* chore: futureproof so use an object

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Danial Raza <danialrazafb@gmail.com>
Co-authored-by: Vlad Frangu <me@vladfrangu.dev>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2024-08-27 22:30:16 +00:00
Almeida
1b1ae2f0cb feat: use get sticker pack endpoint (#10445)
* feat: use get sticker pack endpoint

* fix: mark fetchPack as async

* style: resolve eslint warning

---------

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-08-20 10:13:26 +00:00
cobalt
1f7d1f8094 types: Use ThreadChannel and AnyThreadChannel consistently (#10181)
* types: Use `ThreadChannel` and `AnyThreadChannel` consistently

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

* types: use union in typeguard

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

* types: update `AnyThreadChannel`

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

* types: fix `CommandOptionResolver` tests

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

* types: revert caches changes

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

---------

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>
Signed-off-by: cobalt <61329810+RedGuy12@users.noreply.github.com>
Co-authored-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Almeida <github@almeidx.dev>
2024-08-20 10:09:13 +00:00
Naiyar
9907ff915e feat(VoiceState): add methods for fetching voice state (#10442)
* feat(VoiceState): add methods for fetching voice state

* fix: links to new methods

* chore: remove unused import

* chore: use member id

* chore: requested changes

* chore: '@me' as fetch param

* chore: add ediUserVoiceState return type

* refactor: redirect function calls to VoiceAPI

---------

Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-08-20 10:02:17 +00:00
René
9b707f2b83 types(Client): EventEmitter static method overrides (#10360)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-08-20 09:52:36 +00:00
Danial Raza
5d92525596 feat: application emojis (#10399)
* feat: application emojis

* chore: requested changes

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-08-20 09:33:25 +00:00
René
45f7e1a2e8 fix(GuildAuditLogsEntry): correct mapped AuditLogChange objects (#10438)
* refactor(GuildAuditLogsEntry): correct mapped AuditLogChange objects

* test: check union narrowing behaviour of AuditLogChange

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-08-20 09:20:35 +00:00
Jiralite
bbef68d271 types: Fix wrong auto moderation target type (#10391)
types: fix wrong auto moderation target type

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-08-19 15:34:40 +00:00
Danial Raza
c63bde9479 feat(Attachment): add title (#10423)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-08-19 15:30:47 +00:00
Jacob Morrison
2ca187bd34 feat: Add support for Automated Message nonce handling (#10381)
* Add support for Automated Message nonce handling

* Fix options property

* Address PR feedback

* Handled case where it was explicitly set to false for that iteration to not generate a nonce, and PR feedback

* Fix lint issue

* Fix lint issue

* Move to MessagePayload.resolveBody instead

* Fix test errors

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

Co-authored-by: Almeida <github@almeidx.dev>

* PR feedback

* Merge

* Let and not const

---------

Co-authored-by: Almeida <github@almeidx.dev>
Co-authored-by: Almeida <almeidx@pm.me>
2024-08-19 14:07:46 +00:00
Almeida
5c90b7f716 revert: chore: deprecate client options presence (#10426)
Revert "chore: deprecate client options presence (#10419)"

This reverts commit 8f97d2bacf.
2024-08-06 18:21:10 +00:00
DD
8f97d2bacf chore: deprecate client options presence (#10419)
* chore: deprecate client options presence

* chore: deprecate in typings

* fix: actually use the new prop

* chore: nit

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

* fix: use correct prop

---------

Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-07-31 11:20:49 +00:00
Almeida
3654efede2 feat(GuildAuditLogsEntry): onboarding events (#9726)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-07-09 18:58:11 +00:00
Jiralite
4f59b740d0 feat: Premium buttons (#10353)
* feat: premium buttons

* docs: deprecation string

* feat(InteractionResponses): add deprecation message

* feat(builders): add tests

* chore: remove @ts-expect-errors

* test: update method name

* refactor(formatters): stricter types

* docs: deprecate method in typings

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-07-04 18:57:35 +00:00
Jiralite
b8397b24e5 types(ApplicationCommandManager): Snowflake fetch (#10366) 2024-06-27 11:27:59 +00:00
Jiralite
38c699bc8a fix: Consistent debug log spacing (#10349)
* fix: consistent debug log spacing

* refactor: simplify formatting

* refactor: more readable ternary

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

* fix: modify parameters and types

---------

Co-authored-by: Synbulat Biishev <contact@syjalo.dev>
2024-06-13 16:07:37 +00:00
Danial Raza
68031210f5 feat(Message): add call (#10283)
* feat(Message): add `call`

* refactor: make `endedAt` a getter

* types: fix `endedAt` return type

* types(Message): add `call` property

* docs: requested changes

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2024-06-08 20:30:21 +00:00
Danial Raza
17d4c78fde feat(Invite): add type (#10280) 2024-06-02 22:43:14 +00:00
Almeida
3b5c600b9e feat(User): add avatarDecorationData (#9888)
* feat(User): add `avatarDecorationData`

* fix: remove options

* fix(User): check avatar decoration in equals() methods

* docs: Add full reference

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-06-02 21:26:31 +00:00
René
555961b3b8 refactor(GuildChannelManager): improve addFollower errors (#10277)
refactor(GuildChannelManager): improve errors

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-05-17 13:14:03 +00:00
cobalt
35207b0b31 types: Forum starter messages do not support polls (#10276)
fix(types): Forums do not support polls

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-05-15 17:43:31 +00:00
Frank
c2432d5704 types: Add defaultValues to respective select menu components data (#10265)
* Update index.d.ts

Added 'defaultValues' typings for ChannelSelectMenuComponentData, RoleSelectMenuComponentData, and UserSelectMenuComponentData.

* Update index.d.ts

Adding 'defaultValues' typing to MentionableSelectMenuComponentData

* style: prettier

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2024-05-13 13:29:16 +00:00
Qjuh
914cc4ba54 fix(docs): some link tags didn't resolve correctly (#10269)
* fix(docs): some link tags didn't resolve in summaries

* fix: add TextBasedChannels type
2024-05-13 09:34:11 +00:00
DD
0474a43751 fix(MessageManager): poll methods don't need a channel id (#10249)
* fix(MessageManager): end poll does not need channel id

* chore: rest of the work
2024-05-04 19:06:03 +00:00
Jacob Morrison
cb961f5be3 types: add Poll to Message (#10245)
* Add poll to message type

* Add poll to message type without whitespace changes
2024-05-04 16:06:16 +00:00
Almeida
6cf094c282 feat(MessageManager): poll methods (#10239)
* feat(MessageManager): poll methods

* docs: wording

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

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2024-05-02 20:54:00 +00:00
Almeida
997887069a feat: consumable entitlements (#10235)
* feat: consumable entitlements

* feat: move logic to EntitlementManager

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-05-01 17:57:25 +00:00
Almeida
a1aeaeb9d8 feat: polls (#10185)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-04-30 23:21:07 +00:00
Dawid Jaworski
de14c92c11 feat(ClientUser): Add support for setting bot banner (#10176)
* feat(discord.js): added support to setting bot banner

added feature to set banner for bot from code level
the function is in the experimental phase of Discord.

* fix: resolve requested changes

* fix: add missing type in ClientUserEditOptions

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2024-04-09 14:09:01 +00:00
codershiba
b6bdd578b9 feat(GuildBanManager): Add bulkCreate() method (#10182) 2024-04-02 19:38:48 +00:00
Qjuh
980a2b71c7 types: generic for Webhook type (#10188)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-03-31 14:15:21 +00:00
Qjuh
654f1a48b9 chore: remove ws dependency (#10180) 2024-03-31 14:09:38 +00:00
cobalt
6cc5fa28e6 fix(types): Export ReadonlyCollection (#10184) 2024-03-20 13:10:34 +00:00
iCrawl
93c174bc82 chore: fix test type import 2024-03-11 18:15:21 +01:00
Qjuh
a1010c61f5 types: fix duplicate props in merged interfaces (#10160)
types(discord.js): fix duplicate props in merged interfaces
2024-03-04 11:55:01 +01:00
Jiralite
efa3cac6f2 types: Update accessibility modifiers on constructors (#10147)
types: update accessibility modifiers on constructors
2024-02-23 12:51:13 +00:00
Synbulat Biishev
bfbd62e3e0 types(Builder.from): fix wrong types (#10071)
* types(Builder.from): fix wrong types

* test: add tests

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-02-23 11:54:41 +00:00
Almeida
bcd4c2cb23 types: use readonly array / collection types for user input (#10045)
* types: use readonly arrays

* chore: check on interface properties

* chore: ReadonlyCollection

* chore: exclude EventEmitter methods

* chore: resolve false positive
2024-02-23 00:29:06 +00:00
Almeida
c89c343b0a types(InteractionReplyOptions): allow setting MessageFlags.SuppressNotifications (#9199) 2024-02-20 20:28:37 +00:00
Danial Raza
992aa67841 feat(MessageCreateOptions): add enforceNonce (#10129)
Co-authored-by: almeidx <github@almeidx.dev>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-02-17 18:31:14 +00:00
Suneet Tipirneni
543d61737e feat: add support for using keyword on discord.js Client and WebSocketManager (#10063)
* feat: add support for `using` keyword on client

* fix: use async dispose

* feat: add support for web socket manager disposing

* fix: use interface for client

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-02-13 17:48:56 +00:00
Almeida
f48cb2a357 refactor: remove usage of mixin on error classes (#10128) 2024-02-13 11:54:56 +00:00
Qjuh
54106dbd81 types: replace Mixins with interface merging (#10094)
* types(TextBasedChannelMixin): refactor to user interface merging instead

* types(WebhookMixin): refactor to interface merging

* fix: ignore empty-interface tslint errors

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-02-11 19:26:20 +00:00
Almeida
42bc5d2c74 fix: invert deletable message types list (#10093)
* fix: invert deletable message types list

* docs: consistency

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>
2024-02-03 21:49:11 +00:00
Almeida
bfc7bb5564 docs: convert comment into private remark (#10097)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-01-22 18:45:49 +00:00
Almeida
33674be85e feat(Webhook): allow setting appliedTags on send() (#10027)
* feat(Webhook): allow setting `appliedTags` on `send()`

* docs: fix grammar

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>
2024-01-15 22:29:49 +00:00
Almeida
c4fcee3ef6 feat: premium application subscriptions (#9907)
* feat: premium application subscriptions

* types: readonly array

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

* fix: requested changes

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

* fix: core client types

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-12-24 15:49:58 +00:00