* 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
* fix: the 'color' type on role is set to 'undefined' when its value is '0'
* fix: ensure role color is correctly assigned when value is 0
* fix: revert color type change
* fix(docs): fixed typo in big bot guide
* fix(gateway): fixed an issue which would cause bot status to appear as online if the user used 'offline' as the status
* Update settings.json
* remove offline status in DiscordUpdatePresence.status
* Apply suggestions from code review
---------
Co-authored-by: Awesome Stickz <awesome@stickz.dev>
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
- feat(bot): Add desiredProperties for components, as well as media gallery items and unfurled media items
- fix(types)!: Rename the following types to match the newly updated discord docs:
- InputText to TextInput
- SelectMenu to StringSelect
- SelectMenuUsers to UserSelect
- SelectMenuRoles to RoleSelect
- SelectMenuMentionable to MentionableSelect
- SelectMenuChannels to ChannelSelect
- Update some JSDOC comments to match the new discord docs
Co-authored-by: Fleny <Fleny113@outlook.com>
* 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>
* feat: add missing params to getThreadMember() and getThreadMembers()
* add member property from payload in threadMember transformer
* mark guildId as BigString | undefined and pass undefined in threadMember transformer
* fix type of after, limit params of ListThreadMembers
* add tsdoc for GetThreadMember and GetGuildAuditLog
* make options param of getThreadMember() and getThreadMembers() optional
---------
Co-authored-by: Fleny <Fleny113@outlook.com>