I prefer semicolors, they also help avoiding certain pitfalls in JavaScript/TypeScript, such as the following code sample:
```js
const xyz = "test"
(something.else as string) = "another"
```
This results in a TypeError: "test" is not a function, this is because js thinks we are trying to call the string "test" as a function.
To fix this it requires a `;` somewhere before the `(`, such as `;(something ... ` which in my opinion is ugly and less clean overall.
* feat: enhance user tag getter
* feat(user): add `0000` condition and better jsdoc for tag
* chore(user): use this keyword instead of destructuring assignment
* fix(user): correct isLegacy logic
* feat(images): add ImageOptions
* refactor(images)!: split avatarUrl into more specific functions and add displayAvatarUrl
* feat(user)!: add more useful getters for user
* fix: update tests for images
* chore: using n suffix for bigint instead of converting to bigint
Co-authored-by: Fleny <Fleny113@outlook.com>
* fix: update dependencies for avatarUrl
Co-authored-by: Fleny <Fleny113@outlook.com>
* fix(user): correct the avatarUrl second parameter to avatar hash
Co-authored-by: Fleny <Fleny113@outlook.com>
* chore: undo unnecessary // from auto comment hotkey
Co-authored-by: Fleny <Fleny113@outlook.com>
---------
Co-authored-by: Fleny <Fleny113@outlook.com>
* feat(utils): Add base64url encoding
RFC 7636 (Proof Key for Code Exchange by OAuth Public Clients) requires to encode the data with base64url encoding.
We don't support decoding as we don't need it for PKCE.
* feat(oauth2): Add PKCE support
* make PKCE code verifier optional, fixup comments
---------
Co-authored-by: Awesome Stickz <awesome@stickz.dev>
Uses a fallback value if nothing is passed because the timestamp property is marked as optional. This prevents errors when using the function without arguments.
* Migrate eslint and prettier to biomejs
This does NOT include examples/bigbot as it has its own formatter
* Update to biome 1.8.0
* Readd dotenv dev dependency to rest
During a merge it got lost
* Support integrationTypesConfig in Application
* Add support for commands with integrationTypes and contexts
And deprecate the dmPermission boolean, it is being replaced by contexts
* Update contexts comment to make it more clear
* User-Installed apps
* Add integrationType oauth parameter
fixes#3517
* Add null to contexts
closes#3523
* Mark oauth2 install params as nullable
closes#3525
* Fix typescript errors
* Add preview notices
---------
Co-authored-by: Matt Hatcher <3768988+MatthewSH@users.noreply.github.com>
Exceptions:
- Achievement Icon and Store Page Asset - Game SDK
- Guild Member Banner - Doesn't have documented the banner asset hash
- User Avatar Decoration - Already included in #3257
* chore(deps): upgrade deps to latest in range
* feat: upgrade node engine minimum
Closes#3173
* fix: typing errors after dep upgrade
* chore(deps): upgrade benchmark typescript version
* feat: upgrade eslint, lint staged, and es version
* fix: lint-staged failures
* style: formatting
* chore(deps): major version upgrades
* chore(deps): upgrade yarn to 4.0
* fix: lock typescript to 5.2.2 until ts-node/mocha fix
bug: https://github.com/mochajs/mocha/issues/5031
* chore: remove old Deno file
Went through history and can't find any reference to this after Deno rewrite
* chore(deps): more dep updates
* feat: typedoc config upgrade
* fix: temporarily reset docusaurus to main
* chore(deps): minor range upgrades
* chore(deps)!: docusaurus major upgrade
* revert: go back to original 2.x docusaurus
* feat: add embed builder
* feat: account for if a parsed color is NaN
* feat: add code doc
* feat: add example to JSDoc
* feat: add ability to override the current embed index
* style: remove extra whitespace
* feat: add validate method logic
* feat: finish remaining todo
* fix: account for length value in the setCurrentEmbed call
* feat: removing custom error and throw generic
* feat: add initial tests
* feat: add builder object with embeds function
* feat: changing to a method instead of object
* feat: add more tests
* style: lint
* add OAuth2 routes
* Add oauth2 methods to rest
* Add rest manager methods, Add token params
* Add authorization headers
* Add auth to editUserApplicationRoleConnection
* fix logging header always displaying bot as auth
* Add OAuth2Scope enum
* Start testing ratelimit handling
* Fix now scopes are separated by a space
* move webhook object to DiscordAccessTokenResponse
* convert payload to snake_case
* fix some typings
* more types fixes
* add support for upserting commands with tokens
* handle correctly ratelimit and concurrently
* add guild to DiscordAccessTokenResponse
* Add oauth2 create link function
* Fix removeTokenPrefix to support Bearer tokens
* update jsdoc comment for removeTokenPrefix
* fix removeTokenPrefix unit tests
* fix see link on getMember and getCurrentMember
* add bot helpers and fix some types
* Use objects to pass the bearer tokens
* fix Deno issue with Buffer.from
* Merge 'upstream/main' into feat/oauth2 to fix merge conflict
* Fix debug queue logging
* keep only 1 route for current user
* add Bearer prefixed url to the rest of the logs
---------
Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
* feat: add support for new username system
* fix: default avatar calculation in avatarUrl(), also remove support for old system
* fix: use description from docs for user.globalName
* fix: typings
* fix: avatarUrl() to support both old and new username system