Commit Graph
100 Commits
Author SHA1 Message Date
FlenyandAwesome Stickz 87d16dd9ba feat(types,bot): Add Label component and new modal stuff (#4304)
* feat(types,bot): Add Label component and new modal stuff

Since now there are some fields that are only in responses the types got a bit more complicated

* Add char limits to label label & desc

* update comments

* fix format

* Move Require to shared.ts

* code review

---------

Co-authored-by: Awesome Stickz <awesome@stickz.dev>
2025-09-18 00:50:59 +05:30
FlenyandAwesome Stickz 35133a1575 api-docs: Fix some stuff in interactions (#4457)
* api-docs: Fix some stuff in interactions

* Apply and fix code review suggestions

---------

Co-authored-by: Awesome Stickz <awesome@stickz.dev>
2025-09-17 00:56:50 +05:30
FlenyandAwesome Stickz 0d4f17472f api-docs: banner, avatar, and bio on modify current member (#4458)
* api-docs: banner, avatar, and bio on modify current member

* Update packages/types/src/discordeno/guild.ts

Co-authored-by: Awesome Stickz <awesome@stickz.dev>

---------

Co-authored-by: Awesome Stickz <awesome@stickz.dev>
2025-09-16 21:03:39 +05:30
Fleny 3a99a7e085 api-docs: Social SDK webhook events (#4459) 2025-09-15 15:45:11 +05:30
FlenyandAwesome Stickz d8dbcda383 api-docs!: Remove stage_instance, add expires_at to invites (#4445)
Co-authored-by: Awesome Stickz <awesome@stickz.dev>
2025-09-11 17:29:27 +05:30
FlenyandAwesome Stickz 9aec72df44 test(mocha): Update mocha to 11.7.2 and remove patch (#4429)
Co-authored-by: Awesome Stickz <awesome@stickz.dev>
2025-09-11 17:26:22 +05:30
FlenyandAwesome Stickz ba7ca458b6 docs(bigbot): Send snake_case packets to bot (#4430)
Currently the big bot gateway worker was sending camelCase packets to the bot which caused the transformers in `@discordeno/bot` to not find most of the properties they need in the payload.

This changes the docs to show to override the forwardToBot method to send the packets as-is to the bot.

Co-authored-by: Awesome Stickz <awesome@stickz.dev>
2025-09-11 17:09:41 +05:30
Fleny 11c5147d6f refactor(bot)!: Remove debug event (#4437) 2025-09-08 17:23:17 +02:00
Fleny 96fa6e3a3f chore(gateway)!: Remove Shard forwardToBot (#4431)
forwardToBot has been removed in favor of directly using the events.message.

the default implementation for forwardToBot used to camelize the packet, however in most cases you want to preserve the snake_case, and for those that need camelCase it can be easly done in the message event function.

This also removes the gateway.preferSnakeCase option as it no longer has a use
2025-09-05 08:28:48 +02:00
Fleny 4e08703eab feat(types): Add JSON error code 400001 (#4426) 2025-09-04 08:52:13 +02:00
Fleny 0832500f01 docs(rest): Update documentation for get invites endpoint (#4427) 2025-09-04 08:47:45 +02:00
FlenyandLink 8efd604be3 ci: Add if for image scan job (#4416)
Co-authored-by: Link <link20050703@gmail.com>
2025-09-02 19:01:30 +02:00
Fleny ae650a04d9 refactor(typedoc): update typedoc configuration and mark internal APIs as private (#4405)
The typedoc config is now only in the top-level config file instead of also being one per package
and all internal APIs are now marked as private so typedoc won't generate documentation for them, however we still need to export them to avoid typedoc warnings

The new internal APIs that are exported, since are marked as `@private` can have breaking changes without notices
2025-09-02 08:17:59 +02:00
Fleny 2a7cd9b2a5 refactor(transformers)!: Use type helper to define customizers (#4404)
* refactor(transformers)!: Use type helper to define customizers

This allows us to ensure that customizers always follow the correct types for the transformers and we don't have 2 places to add the types.

* remove outdated comment in transformInteractionDataResolved

* remove not needed cast

* remove not needed cast
2025-09-02 06:54:38 +02:00
Fleny 304aacdba9 feat(bot)!: Camelize the AuditLogEntry changes (#4403)
* feat(bot)!: Camelize the AuditLogEntry changes

* fix type errors
2025-08-29 11:02:33 +02:00
FlenyandLink e94308c8f2 chore: Imports directly from files instead of index files (#4400)
Currently we import from `index.js` files where we could simply import the actual file(s) or module we need.

This also creates a bit of confusion since it isn't obvious from where stuff is coming from, especially when we are importing types such as `Discord<XYZ>` types both from `@discordeno/types` and a `index.js` in the same file, one such example is `transformers/reverse/component.ts`.

As far as I can tell, this does not have any specific advantage beside readability, maybe something with tree-shaking. (and for us, tree-shaking doesn't really matter)

The only files that still import index.js files are:
- index.js files themself
- bot/src/handlers.js since it does a `import * as handlers from './handlers/index.js'` and the alternative is like 90 lines of imports

Co-authored-by: Link <link20050703@gmail.com>
2025-08-26 20:41:14 +02:00
FlenyandLink 3af54ca144 ci: Use biome ci in lib-check format (#4399)
Co-authored-by: Link <link20050703@gmail.com>
2025-08-26 20:00:36 +02:00
FlenyandLink b7db305dee refactor: Use TransformerFunction to define transformers (#4402)
Co-authored-by: Link <link20050703@gmail.com>
2025-08-26 10:56:43 -07:00
FlenyandLink c7074d7837 fix(types): Update which messages can be forwarded (#4398)
Co-authored-by: Link <link20050703@gmail.com>
2025-08-26 10:32:01 -07:00
FlenyandLink 274b5972dd feat(types,bot): Add RATE_LIMITED & RESUMED handler & event (#4391)
Co-authored-by: Link <link20050703@gmail.com>
2025-08-24 14:14:14 -07:00
Fleny 33ea279714 feat(types): Add PIN_MESSAGES permission (#4390) 2025-08-24 14:01:40 -07:00
Fleny 590653f572 fix(bot): Remove VOICE_STATE_UPDATE payload check (#4389) 2025-08-22 21:37:26 +02:00
FlenyandLink 269a5bf5f5 chore: Bump version to v22-beta.1 (#4377)
Co-authored-by: Link <link20050703@gmail.com>
2025-08-22 10:55:03 -07:00
FlenyandLink bd37023847 ESM-only build (#4227)
Co-authored-by: Link <link20050703@gmail.com>
2025-08-22 10:48:28 -07:00
FlenyandLink 8996169b9d build(deps-dev): Update typescript & @types/node (#4325)
Co-authored-by: Link <link20050703@gmail.com>
2025-08-22 09:39:52 -07:00
FlenyandLink 2ccf3c1437 ci: Fix snyk scan (#4317)
Co-authored-by: Link <link20050703@gmail.com>
2025-08-20 20:44:11 -07:00
FlenyandLink 52fc7b8c97 build(deps-dev): Update @biomejs/biome (#4327)
Co-authored-by: Link <link20050703@gmail.com>
2025-08-20 20:39:23 -07:00
FlenyandLink b6f2d914b8 ci: Use biome ci in lib-check format (#4319)
Co-authored-by: Link <link20050703@gmail.com>
2025-08-20 20:35:25 -07:00
FlenyandLink 5d0cef5dca build(deps): Update ws & @types/ws (#4332)
Co-authored-by: Link <link20050703@gmail.com>
2025-08-20 20:32:03 -07:00
FlenyandLink 7a97340bdb build(deps-dev): Update lint-staged (#4328)
Co-authored-by: Link <link20050703@gmail.com>
2025-08-20 20:28:46 -07:00
FlenyandLink 9759eba986 ci: Specify permissions for CI (#4338)
Co-authored-by: Link <link20050703@gmail.com>
2025-08-20 19:07:49 -07:00
FlenyandLink be3e2abd69 build(deps-dev): Update @types/sinon & @types/chai-as-promised (#4331)
Co-authored-by: Link <link20050703@gmail.com>
2025-08-20 18:42:09 -07:00
Fleny a9cfdcff9a build(deps-dev): Update @swc/cli (#4329) 2025-08-20 16:15:05 -04:00
Fleny 41d58f8d2a build(deps-dev): Update turbo (#4326) 2025-08-20 16:07:22 -04:00
Fleny d5b2974d9f chore: use biome check instead of separate lint and format commands (#4320) 2025-08-20 16:03:42 -04:00
FlenyandLink 49a8cd1aa6 Double the REST E2E testing timeout (#4318)
Co-authored-by: Link <link20050703@gmail.com>
2025-08-20 12:57:40 -07:00
FlenyandLink c429ec9c36 feat(bot)!: Use an "extra" params for transformers (#4372)
Co-authored-by: Link <link20050703@gmail.com>
2025-08-20 12:10:35 -07:00
FlenyandLink 27e53b801a fix(types)!: Fix discordeno/user.ts (#4365)
Co-authored-by: Link <link20050703@gmail.com>
2025-08-20 11:11:14 -07:00
FlenyandLink df3cfebb86 chore(.github): Assign @discordeno/team to most codeowners (#4379)
* chore(.github): Add @discordeno/team to most codeowners

Also removes /.github/sync.yml, that file does not exist

* Remove explit mentions

They are already in the team, so they do get the perms anyway

* Update .github/CODEOWNERS

Co-authored-by: Link <link20050703@gmail.com>

---------

Co-authored-by: Link <link20050703@gmail.com>
2025-08-20 11:52:12 -05:00
FlenyandLink 702b252396 fix(types)!: Fix discordeno/interactions.ts (#4360)
Co-authored-by: Link <link20050703@gmail.com>
2025-08-17 20:20:23 -07:00
FlenyandLink d79e672f5a feat(gateway): Use node:zlib zstd when available (#4373)
Co-authored-by: Link <link20050703@gmail.com>
2025-08-17 13:38:46 -07:00
FlenyandLink fca0b40be5 feat(bot)!: Make desiredProperties required (#4381)
Co-authored-by: Link <link20050703@gmail.com>
2025-08-17 13:01:58 -07:00
Fleny 83a075e64b docs: Add desired properties to examples (#4380) 2025-08-17 12:59:11 -07:00
Fleny b47feae4fa fix(bot): Remove handlers payload checks (#4374)
To remove the check from VOICE_STATE_UPDATE we need to wait for #4372 to get merged
2025-08-17 09:16:03 +02:00
Fleny 0b073a151d chore(rest): Remove todo about GET bodies (#4375)
We do not need to do anythng with GET bodies, fetch() will even throw if a body is passed to a GET
2025-08-17 09:10:46 +02:00
FlenyandLink ed85fe9a5f chore(bot): Remove incorrect joinedAt (#4376)
Co-authored-by: Link <link20050703@gmail.com>
2025-08-17 09:00:37 +02:00
Fleny 7d09a05ea1 docs: switch bigbot and caching guide position in docs (#4378) 2025-08-16 22:57:19 +05:30
Fleny 825906aed7 fix(bot): Check nullable in transformPresence (#4370)
Despite the type not having the optional, it may get called with an partial object
2025-08-16 20:53:07 +05:30
Fleny 38d1707788 fix(types)!: Fix discordeno/message.ts (#4362) 2025-08-15 22:13:02 -04:00
Fleny 84087917ef fix(types)!: Fix discordeno/channel.ts (#4355) 2025-08-15 22:09:56 -04:00
Fleny 5de802e352 fix(types)!: Fix discordeno/guild.ts (#4357) 2025-08-15 22:06:29 -04:00
Fleny d203fc780f fix(types): Fix discordeno/guildTemplate.ts (#4359) 2025-08-15 22:02:30 -04:00
Fleny ba9402e5d2 fix(types): Fix discordeno/stageInstance.ts (#4364) 2025-08-15 16:15:57 -04:00
Fleny 6f8191516a fix(types): Fix discordeno/autoModeration.ts (#4354) 2025-08-15 16:07:13 -04:00
FlenyandLink 033023f0a3 fix(types)!: Fix discordeno/guildScheduledEvent.ts (#4358)
Co-authored-by: Link <link20050703@gmail.com>
2025-08-15 15:58:01 -04:00
FlenyandLink eabf34b511 fix(types)!: Fix discordeno/application.ts (#4353)
Co-authored-by: Link <link20050703@gmail.com>
2025-08-15 15:54:00 -04:00
FlenyandLink 01dd69b482 fix(types): Fix discordeno/lobby.ts (#4361)
Co-authored-by: Link <link20050703@gmail.com>
2025-08-15 15:18:54 -04:00
FlenyandLink 511022fcd0 fix(types): Fix discordeno/emoji.ts (#4356)
Co-authored-by: Link <link20050703@gmail.com>
2025-08-15 15:11:09 -04:00
FlenyandLink 0c0ff4e07a fix(types): Fix discordeno/reference.ts (#4363)
* fix(types): Fix discordeno/reference.ts

* Apply suggestions from code review

---------

Co-authored-by: Link <link20050703@gmail.com>
2025-08-15 14:15:31 -04:00
Fleny 9de5d93014 feat(bot): Add guildId to ThreadMember (#4335) 2025-08-14 19:21:22 -07:00
Fleny 6679f2c0e4 chore(bot,utils): Move snowflake utils to @discordeno/utils (#4345) 2025-08-14 12:08:19 -07:00
FlenyandLink 247fd4b348 fix(rest): Rewrite rest.simplifyUrl (#4305)
* fix(rest): Rewrite rest.simplifyUrl

* Update packages/rest/src/manager.ts

Co-authored-by: Link <lts20050703@gmail.com>

---------

Co-authored-by: Link <lts20050703@gmail.com>
2025-08-14 20:38:03 +02:00
Fleny 86f8fbd589 fix(bot)!: Remove InternalBot, add messagePin transformer (#4302) 2025-08-14 18:43:34 +02:00
FlenyandLink 65cbe5d1e6 fix(types)!: Split and fix discordeno.ts (#4301)
* fix(types)!: Split and fix discordeno.ts

* fix some mistakes

* remove now not needed @ts-expect-error

* Apply code review suggestions

* Fix test type errors

* Revert "Apply code review suggestions"

This reverts commit 7a0cea84b3.

* Restore some of the changes from the revert

---------

Co-authored-by: Link <lts20050703@gmail.com>
2025-08-14 18:37:52 +02:00
Fleny d50d47ec99 feat(gateway)!: Rename shard.events.identified to shard.events.ready (#4334) 2025-08-14 08:29:19 +02:00
Fleny b70cf76165 feat(bot)!: Remove bot.events.guildUnavailable (#4336)
It is now merged with the guildDelete event
2025-08-13 16:18:03 +05:30
Fleny 51158071ad api-docs!: remove GetInvite.withExpiration, remove optional from DiscordInvite.expires_at (#4321) 2025-08-13 11:09:39 +02:00
Fleny a5a3e412ac Remove the deno benchmark code (#4322)
This is not the actual benchmark we have (and we don't even run the one we do have)
instead this is a Deno version of the benchmark and i can't find anything
that uses this benchmark

This is also somewhat annoying to keep as something the Typescript Server
may decide to typecheck those files and it will complain no stop because
it can't find what `Deno` is and doesn't understand importing urls
2025-08-13 10:58:14 +02:00
Fleny f4eb8f1f67 build(deps): Update fastify in docker-apps/rest-passthrough (#4324) 2025-08-13 10:51:50 +02:00
Fleny 6ed7cfc8a8 build(deps): Migrate to React Flow v12 and update website dependencies (#4330)
* build(deps): Update dependencies in website

* Update reactflow to @xyflow/react
2025-08-13 10:39:15 +02:00
Fleny 0f359e5013 chore: Disable runOn folderOpen for turbo watch vscode task (#4316)
The task currently opens up as soon as visual studio code opens the folder
and it is very much annoying since it pops up immediately and also for example
for me it makes my pc lag quite a bit due to the amount of files being watched
and git processes that it spawns to calculate the hashes (this is at least
my understanding of what it is doing with all the git processes)
2025-08-12 20:40:23 +02:00
FlenyandLink 109a478a5b fix(types): Sort teams.ts types (#4297)
* Sort teams.ts types

* Update packages/types/src/discord/teams.ts

Co-authored-by: Link <lts20050703@gmail.com>

---------

Co-authored-by: Link <lts20050703@gmail.com>
2025-08-11 19:43:54 +02:00
Fleny 946e22dc2f fix(types)!: Sort & fix message.ts types (#4293) 2025-08-11 19:41:00 +02:00
Fleny 2f48861ebf fix(types)!: Sort & fix webhook.ts types (#4300)
* Sort & fix webhook.ts types

* Remove DiscordApplicationWebhook and rename DiscordIncomingWebhook to DiscordWebhook
2025-08-11 19:37:31 +02:00
Fleny 6b8365eca6 api-docs: Fix payload for modify current user voice state (#4307) 2025-08-11 19:03:54 +02:00
Fleny 09d2697d37 api-docs: Update comment on getMessages (#4306) 2025-08-11 18:55:41 +02:00
Fleny f6ea699dfe fix(types)!: Sort & fix guild.ts properties (#4288)
* Sort & fix guild.ts properties

* Fix type errors

* Apply code review suggestions
2025-08-11 18:51:00 +02:00
FlenyandLink 485fd1bc67 fix(types)!: Sort & fix sticker.ts types (#4296)
* Sort & fix sticker.ts types

* Update packages/types/src/discord/sticker.ts

Co-authored-by: Link <lts20050703@gmail.com>

---------

Co-authored-by: Link <lts20050703@gmail.com>
2025-08-11 18:45:33 +02:00
Fleny d713d09064 fix(types)!: Fix nullability for DiscordEmoji (#4285)
* Fix nullability for DiscordEmoji

* Fix type errors, use actual DiscordEmoji for partial emojis

* Apply code review suggestions
2025-08-11 18:41:50 +02:00
FlenyandLink 3e6bf86db0 fix(types)!: Sort & fix user.ts types (#4298)
* Sort & fix user.ts types

* Update packages/types/src/discord/user.ts

Co-authored-by: Link <lts20050703@gmail.com>

---------

Co-authored-by: Link <lts20050703@gmail.com>
2025-08-11 18:37:10 +02:00
FlenyandLink 088de8c417 fix(types)!: Sort & fix interactions.ts types (#4290)
* Sort & fix interactions.ts types

* Fix type errors

* Apply suggestions from code review

Co-authored-by: Link <lts20050703@gmail.com>

---------

Co-authored-by: Link <lts20050703@gmail.com>
2025-08-11 18:33:47 +02:00
Fleny b30e2ff259 fix(types): Sort & fix gateway.ts properties (#4287) 2025-08-11 09:05:17 +02:00
Fleny 3e325d47e9 fix(types): Sort permissions.ts types (#4294) 2025-08-11 08:58:37 +02:00
Fleny de000b67b4 fix(types)!: Sort & fix stageInstance.ts types (#4295) 2025-08-11 08:53:31 +02:00
Fleny 12d2cff747 fix(types): Sort voice.ts types (#4299) 2025-08-11 08:43:15 +02:00
FlenyandLink f199bbf71c build(dev-deps): Update biome to v2 (#4246)
* update biome to v2

* Run biome check --write

* Update biome.jsonc

Co-authored-by: Link <lts20050703@gmail.com>

* Fix config error

* Bump biome version

* Update website/yarn.lock

* Update biome to 2.1.3

---------

Co-authored-by: Link <lts20050703@gmail.com>
2025-08-09 12:45:04 -05:00
Fleny c86c512c60 fix(gateway): Pass down the logger to the buckets leakyBucket (#4303) 2025-08-08 20:55:21 +02:00
Fleny 5201817edc fix(types)!: Sort & fix lobby.ts types (#4292) 2025-08-07 10:56:58 +02:00
Fleny 4d1930599c fix(type): Sort & fix invite.ts types (#4291) 2025-08-07 10:53:51 +02:00
Fleny 6dec4bcedb fix(types)!: Sort & fix guildScheduledEvent.ts properties (#4289) 2025-08-07 10:50:44 +02:00
Fleny d9831f6dd1 fix(types): Sort properties in DiscordEntitlement (#4286) 2025-08-07 10:47:46 +02:00
4792ad2721 feat(rest): Add events (#4245)
* feat(rest): Add events

* Apply suggestions from code review

Co-authored-by: Awesome Stickz <awesome@stickz.dev>

* Remove timeTook, consolidate event types

* Update packages/rest/src/manager.ts

Co-authored-by: Awesome Stickz <awesome@stickz.dev>

* Fix type error

* Apply suggestions from code review

Co-authored-by: Link <lts20050703@gmail.com>

---------

Co-authored-by: Awesome Stickz <awesome@stickz.dev>
Co-authored-by: Link <lts20050703@gmail.com>
2025-08-04 19:49:44 +02:00
27ab08a61d feat(gateway)!: Resharding with workers (#4206)
* feat(gateway): Rework how shards are resharded

* Make bigbot example use the resharding

* fix reshard doesn't increment the lastShardId

From my testing it works, however i don't know if we should just do
this or is there a better way

* revert createGatewayManager type changes
It breaks if you want to disable resharding, didn't think of that

* Fix typo (#4252)

* Apply suggestions from code review

Co-authored-by: Link <lts20050703@gmail.com>

---------

Co-authored-by: NotDemonix <90858555+NotDemonix@users.noreply.github.com>
Co-authored-by: Link <lts20050703@gmail.com>
2025-08-04 19:46:24 +02:00
Fleny 8fd277924f fix(bot): ACK the interaction only after a successful response (#4280) 2025-08-04 08:46:47 +02:00
FlenyandLink 7413dca9f6 test(rest): Don't create as many channel, ensure we delete the resources we create (#4283)
Co-authored-by: Link <lts20050703@gmail.com>
2025-08-04 08:42:50 +02:00
Fleny 278099ae30 fix(types,bot)!: GetChannelPins.items is an array (#4284) 2025-08-03 17:22:12 -07:00
Fleny 068ecf897b api-docs!: Remove deleteGuild & EditGuild.ownerId (#4269)
* Remove deleteGuild & EditGuild.ownerId

* Change E2E test
2025-07-31 21:05:31 +02:00
Fleny f4098d573f api-docs: Add GUILD_TAGS guild feature (#4271) 2025-07-30 17:50:47 +02:00
Fleny 5983af8c9b api-docs!: remove editGuildMFA (#4270) 2025-07-30 17:47:51 +02:00
Fleny 979f1a248c api-docs!: Remove createGuild and createGuildFromTemplate (#4268) 2025-07-30 17:45:01 +02:00