Commit Graph

416 Commits

Author SHA1 Message Date
Almeida
01f31f374a chore: bump dependencies (#11356)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-12-10 17:53:48 +00:00
Almeida
f60d3d65fe refactor!: move embedLength function to util package (#11327)
BREAKING CHANGE: Builders no longer exports a `embedLength` function. Import it from `@discordjs/util` instead.

Co-authored-by: Danial Raza <danialrazafb@gmail.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2025-12-09 18:40:34 +00:00
Almeida
c9bc33c758 fix(stringOptionPredicate): min_length and max_length min values (#11340)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2025-12-09 00:20:15 +00:00
Jiralite
d90a86a048 fix(Message): Optional parameter for setting allowed mentions (#11338)
feat: allow empty allowed mentions

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-12-08 23:14:34 +00:00
Egologics
fa43c40d34 fix(builders): handle 0 as valid attachment ID (#11330)
* fix(builders): handle 0 as valid attachment ID

Fixes #11314

The AttachmentBuilder.getRawFile() method was using a falsy check that treated 0 as invalid. Changed to use the 'in' operator to properly check for the existence of the id property.

* Update packages/builders/__tests__/messages/fileBody.test.ts

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

* Apply suggestion from @almeidx

* fix: lint

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Almeida <github@almeidx.dev>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-12-08 23:08:36 +00:00
Almeida
d0745afbea chore: upgrade vitest to v4 (#11336) 2025-12-08 18:55:45 +00:00
Denis-Adrian Cristea
9005c8ae9c refactor!: remove AttachmentBuilder and support new file body encodables (#11278)
BREAKING CHANGE: Remove AttachmentBuilder

---------

Co-authored-by: Vlad Frangu <me@vladfrangu.dev>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2025-12-08 10:19:43 +02:00
Jiralite
5e6bd4b3d7 build: Bump dependencies (#11333)
* build: bump dependencies

* fix: guide build

* build: amend package.json.hbs

* build: create-discord-bot

* style: formatting

* build: final change

---------

Co-authored-by: almeidx <github@almeidx.dev>
2025-12-06 22:55:07 +00:00
Jiralite
2520a0fb96 chore: @favware/cliff-jumper schema (#11328)
* chore: add schema

* chore: template pain

* build: remove from docgen
2025-11-30 21:54:51 +00:00
Jiralite
a57b4d4d29 fix: Allow mixing subcommands with subcommand groups (#11303)
fix: allow subcommand with groups

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-11-30 16:48:19 +00:00
Jiralite
8162ae8ce0 test: Add toJSON() to tests (#11321)
test: fix validation

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-11-30 16:41:48 +00:00
Jiralite
ace834b274 fix: Adjust label predicates and fix buttons emoji/label behaviour (#11317)
* fix: buttons with custom id

* fix: button labels

* fix: also add refinement to link buttons

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-11-30 16:17:50 +00:00
Rie
d59857e901 fix(builders): add proper snowflake validation (#11290)
* fix(builders): add proper snowflake validation

close #11289

* fix(builders): use snowflake validation for attachment id

* test(builders): add validation tests for snowflake attachment IDs

* fix: better regex

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

* test(builders): fix snowflake validation in fileBody test

* Update packages/builders/src/Assertions.ts

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

* fix: update regex

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Almeida <github@almeidx.dev>
Co-authored-by: Vlad Frangu <me@vladfrangu.dev>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-11-30 15:30:04 +00:00
Denis-Adrian Cristea
68bb8af58a feat(builders): multipart form data output support (#11248)
* feat(builders): multipart form data output support

* refactor: proper key management

* chore: add missing remarks

* chore: requested changes

* chore: rename encodables file

* chore: requested changes

* chore: requested changes

* chore: nits

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

* chore: requested change

* chore: requested change

---------

Co-authored-by: Almeida <github@almeidx.dev>
2025-11-19 21:59:51 +00:00
Jiralite
3cb3ecae21 docs(BaseSelectMenu): Adjust maximum wording (#11249)
docs(BaseSelectMenu): adjust wording

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-11-05 19:30:36 +00:00
Naiyar
06a75e80bc docs: clarify wording for maximum values (#11231)
* docs(FileUpload): clarify wording

* chore: missed instances

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-11-01 14:33:34 +00:00
Almeida
fb5c629638 chore: bump dependencies (#11225) 2025-10-31 11:15:45 +00:00
Jiralite
83ec0fdcdf refactor: Use idPredicate for file uploads (#11195)
refactor: use `idPredicate`
2025-10-24 10:45:37 +00:00
Jiralite
c84024968e feat: File upload support (#11108)
* build: bump discord-api-types

* feat: add support

* docs: correct examples

* fix(MappedComponentTypes): fix description

Co-authored-by: advaith <advaithj1@gmail.com>

* fix: use `z.int()`

* chore: remove errors

---------

Co-authored-by: advaith <advaithj1@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-10-24 10:16:05 +00:00
Jiralite
0cc92bd5b0 fix(textInput): Allow empty strings for a value (#11182)
fix: allow empty strings

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-10-16 13:55:15 +00:00
Naiyar
1a305fe4ad build: bump discord-api-types to 0.38.30 (#11178)
* build: bump discord-api-types to 0.38.30

* chore: slap the errors
2025-10-14 18:02:10 +00:00
Denis-Adrian Cristea
f9ca29e3e4 chore: update readme badges (#11152)
* chore: update readme badges

* chore: add href

* chore: other readmes

* chore: reintroduce badge

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-10-13 12:54:08 +00:00
Jiralite
a97ac82619 fix(guide): Miscellaneous fixes (#11147)
* fix: miscellaneous fixes

* docs: fix contributing link

* fix: link

* fix: you

* fix: main links

* fix: update source

* fix: update link

* fix: update update link

* fix: [

* fix: remove locale

* fix: update links

* fix: update GitHub link

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-10-09 12:41:15 +00:00
Almeida
985b525556 chore: bump dependencies (#11133)
* chore: bump dependencies

* chore: another bump
2025-10-06 22:42:31 +00:00
Vlad Frangu
05224e78ec fix(builders): correct assertion for select menu string min/max values (#11139)
* fix(builders): correct assertion for select menu string min/max values

* fix: actually fix the logic

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-10-05 15:28:34 +00:00
Jiralite
0d76f1149f fix: Add idPredicate (#11109)
* fix: `idPredicate`

* fix: add test

* test: add negative test
2025-09-26 16:06:22 +00:00
Jiralite
beed098bf2 fix: Add type to some predicates (#11110)
fix: add `type`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-09-22 09:10:20 +00:00
Jiralite
b66f52f9aa feat!: More label components and text display in modal (#11078)
BREAKING CHANGE: Modals only have adding (no setting) and splicing has been replaced with a generalised splice method to support all components.
2025-09-14 09:09:56 +01:00
Jiralite
5d5a6945e4 build: Update discord-api-types to 0.38.23 (#11095)
build: update
2025-09-10 08:30:00 +00:00
Jiralite
f7c77a73de feat(builders)!: Support select in modals (#11034)
BREAKING CHANGE: Text inputs no longer accept a label.
BREAKING CHANGE: Modals now only set labels instead of action rows.
2025-09-05 17:56:14 +01:00
Almeida
cc43dadcae chore: bump dependencies (#11051)
* chore: bump dependencies

* build: bump discord-api-types to 0.38.22

* fix: fix builders

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-08-29 12:01:54 +00:00
Jiralite
f2fec9177f feat: Enforce limit of URLs for link buttons (#11011)
feat: enforce limit of URLs for link buttons
2025-07-23 14:20:56 +00:00
Jiralite
3a060f7494 docs: Replace Discord API with Discord Developers (#10968)
docs: replace with Discord Developers
2025-07-22 10:33:42 +00:00
Jiralite
aee6d311c0 fix(Container): Use the same discord-api-types version (#10999)
fix(Container): use v10
2025-07-17 07:38:16 +00:00
Jiralite
1dfc511e4f fix(contextMenu): Remove regular expression validation (#10994)
* fix: remove regex validation

* test: remove incorrect test

This is fine to create.

* fix: guard against whitespace
2025-07-16 15:47:29 +00:00
Almeida
de2b2dd330 chore: bump dependencies (#10967) 2025-07-13 19:39:47 +00:00
Danial Raza
024ae5c566 build: bump discord-api-types to 0.38.15 (#10966) 2025-07-05 16:33:10 +00:00
Almeida
a5bd4cfe73 feat!: use zod v4 (#10922)
* feat: zod 4

* feat: zod v3, but v4

feat: validation error class

Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com>

* chore: bump

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com>
2025-07-03 01:02:45 +01:00
Danial Raza
02fbb706aa build: bump discord-api-types to 0.38.14 (#10960) 2025-07-01 04:44:33 +00:00
Jiralite
536a546514 fix(containerPredicate): Remove maximum limit (#10959)
fix: remove maximum limit
2025-06-30 14:24:41 +00:00
Vlad Frangu
d53b203174 chore: update tests badge across repository (#10948)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-06-25 23:36:47 +00:00
Almeida
e094faf225 docs: add missing, fix existing (#10842)
* docs: add missing, fix existing

* refactor: new stuff

* fix: requested changes

* fix: use `@link` for `@mixes`

Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com>

* chore: disable bad eslint rule

---------

Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-06-02 17:35:43 +00:00
Almeida
78d512c347 docs: export all visible symbols (#10760)
* docs: export all visible symbols

* fix: discord.js except raw

* refactor: remove raw data types

* docs: add back discord.js tsdoc file

* refactor: remove underscores

* fix: merge

* docs(RPCRedis): make `promises` as internal

---------

Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-05-26 17:41:08 +00:00
Noel
2184085fda docs: guide setup (#10862) 2025-04-28 02:23:27 +02:00
Vlad Frangu
291012c18a chore: forward-port release metadata from side branches (#10848)
* chore(rest): forward-port release metadata from v14 branch

* chore(formatters): forward-port release metadata from builders/v1 branch

* chore(builders): forward-port release metadata from builders/v1 branch

* chore(core): forward-port release metadata from v14 branch

* chore(ws): forward-port release metadata from v14 branch

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-04-27 18:30:38 +00:00
Almeida
8f375275ca fix: message builders (#10802)
* fix: message builders

- Added `clearParse`, `clearRoles`, and `clearUsers` methods to the `AllowedMentionsBuilder`, since passing an empty array and omitting the these fields behave differently
- Strictened assertions
- Removed `AttachmentBuilder#clearId`, as it is a required field
- Added missing `MessageBuilder#setEmbeds`
- Added missing `MessageReferenceBuilder#setFailIfNotExists`
- Improve/fix documentation
- Consistency™️

* fix: updater functions return type

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-04-25 20:52:00 +00:00
Qjuh
5a4de953fa fix: generateSplitDocumentation for external docs on main (#10827)
* fix: generateSplitDocumentation for external docs on main

* fix: remove console.log

* chore: apply suggestion

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

* fix: mixes tag

* chore: docs include collection

---------

Co-authored-by: Almeida <github@almeidx.dev>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-04-24 19:19:52 +00:00
Sammy
891fe277bf fix(builders): export container component (#10844) 2025-04-24 17:13:34 +00:00
Vlad Frangu
abc5d99ce8 feat: components v2 in builders (#10788)
* feat: thumbnail component

* chore: just a temp file to track remaining components

* feat: file component

* feat: section component

* feat: text display component

* chore: bump alpha version of dtypes

* chore: simplify ComponentBuilder base type

* feat: MediaGallery

* feat: Section builder

* chore: tests for sections

* chore: forgot you

* chore: docs

* fix: missing comma

* fix: my bad

* feat: container builder

* chore: requested changes

* chore: missed u

* chore: type tests

* chore: setId/clearId

* chore: apply suggestions from code review

* chore: unify pick

* chore: some requested changes

* chore: tests and small fixes

* chore: added tests that need fixing

* fix: tests

* chore: cleanup on isle protected

* docs: remove locale

* chore: types for new message builder

* chore: fix tests

* chore: attempt 1 at message builder assertions

* chore: apply suggestions

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

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

* Update packages/builders/src/components/v2/Thumbnail.ts

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

* fix: tests

* chore: fmt

* Apply suggestions from code review

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

* chore: fix pnpm lockfile revert

---------

Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Denis-Adrian Cristea <didinele.dev@gmail.com>
2025-04-23 17:29:15 +00:00
Vlad Frangu
42ce116226 chore(deps): bump discord-api-types (#10841)
* chore(deps): bump discord-api-types

* chore: tests

* chore: tests 2

* chore: replace ImageSize type with dtypes type
2025-04-22 17:12:34 +00:00