* 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>
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
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)
* 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>
* Add max of 512 chars for button urls
* Update packages/types/src/discordeno.ts
Co-authored-by: Link <lts20050703@gmail.com>
---------
Co-authored-by: Link <lts20050703@gmail.com>
* Add IS_VOICE_MESSAGE to CreateMessageOptions
* Update packages/types/src/discordeno.ts
Co-authored-by: Link <lts20050703@gmail.com>
---------
Co-authored-by: Link <lts20050703@gmail.com>
* Update the description for identity_enabled to be clearer
* Update packages/bot/src/transformers/types.ts
Co-authored-by: Link <lts20050703@gmail.com>
---------
Co-authored-by: Link <lts20050703@gmail.com>
* Split extra fields into their own types
For now they are added back to the types they belong to to avoid
breaking in this pr
* fix type errors
* Fix typo 1
Co-authored-by: Link <lts20050703@gmail.com>
* Fix typo 2
Co-authored-by: Link <lts20050703@gmail.com>
* Use omit and not partial on guild voice_states
Co-authored-by: Link <lts20050703@gmail.com>
* Remove unused `ts-expect-error`
---------
Co-authored-by: Link <lts20050703@gmail.com>
* feat(types): Add new rich presence url & status display type fields
* Update packages/types/src/discord/gateway.ts
Co-authored-by: Link <lts20050703@gmail.com>
* Use examples in DiscordStatusDisplayType
---------
Co-authored-by: Link <lts20050703@gmail.com>
They exited in the types but didn't in the runtime object causing a runtime error when the code needed to transform a nameplate
Co-authored-by: Awesome Stickz <awesome@stickz.dev>
* Update docusaurus to v3.8, improve performance
Docusaurus:
- Update to v3.8.0
- Enable new faster features, rspack bundler cache and worker threads
- Update CI to cache rspack bundler cache
- Update dependencies to latest versions
- Update blog posts to use the truncate tag
- Update caniuse-lite
Removed duplicated type documentation generation for bot package
* Use .jsonc files for typedoc
And use the readme option instead of a custom script
* remvoe typedoc script
---------
Co-authored-by: Jonathan Ho <heiheiho000@gmail.com>
* Use DesiredPropertiesError instead of strings
Using an object allows typescript to error in more cases as with strings
if the original propriety was a string it would not error for stuff like
`.endsWith(...)`
We use a symbol to make sure the type doesn't actually become a generic
object, but instead is a specific type that can be checked against.
* Update docs
* Spawn one shard at a time
* remove useless code in ShardIdentified handling
* update comment on tellWorkerToIdentify
* fix mistake
* Use request identify
This also makes some unrelated changes needed to make the example
comple when using the build from this branch.
* remove debug logs
The limit is still in place however it is 40 total,
so it is a bit more complicated to explain and the discord docs
are better at doing so than what we can do with JSDoc
* Remove incorrect, reorder and fixes in channel
- Updated comments to be more clear
- Remove `Channel.newly_created`, doesn't seem to exist in the api docs
- Fix nullability for some fields
- Remove DiscordActiveThreads, DiscordArchivedThreads and DiscordListActiveThreads as they don't seem to match anything in the api
* Add back DiscordListActiveThreads but under Guild
and fix type errors
* Update packages/types/src/discord/channel.ts
Co-authored-by: LTS (Link) <lts20050703@gmail.com>
* Revert newly_created removal
* Apply suggestions from code review
Co-authored-by: LTS (Link) <lts20050703@gmail.com>
---------
Co-authored-by: LTS (Link) <lts20050703@gmail.com>
* Update Slash Command Command Name regex
* Update comments to reflect the change
* Use the correct apostrophe in the regex
While the docs use the regular ', discord accepts
the unicode apostrophe ʼ.
* Add lobby support
* Fix CI
Apparently for extends a bot was a LobbyMember since both had
a required id property and even if LobbyMember had other properties
as well that did not matter
* update LobbyMember flags to use ToggleBitfield
While discord does not say anything explicit about deprecating the
createGuildFromTemplate endpoint, it is a fair assumption to make that
it is included in this change
Co-authored-by: Awesome Stickz <awesome@stickz.dev>
* Fix optionals for some props in autoModeration.
Also fix some comments to be more clear
* Fix type error in automodActionExecution
* Fix type error in automod.spec.ts e2e test
---------
Co-authored-by: Awesome Stickz <awesome@stickz.dev>
* Keep state to avoid unwanted disconnections
This keeps a state to know that we wanted to end the connection with a
code of 1000 or 1001 to avoid unwanted disconnections in case discord /
someone in the middle of the TCP connection (such as cloudflare) sends a
close code of 1000 or 1001.
* Apply suggestions from code review
Co-authored-by: Awesome Stickz <awesome@stickz.dev>
---------
Co-authored-by: Awesome Stickz <awesome@stickz.dev>