Commit Graph

8 Commits

Author SHA1 Message Date
Fleny
27c261fee2 formatter: Use semicolons (#4686)
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.
2026-01-17 21:54:15 +01:00
Fleny
a55127fb93 feat(utils): Support 'random' in setColor (#4093)
* support 'random' in setColor

* use toLowerCase for color in setColor
2025-01-16 22:25:13 -06:00
Dominik Koch
a0fec368fa fix(default-timestamp): add fallback to current date (#4081)
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.
2025-01-01 09:26:09 -08:00
Dominik Koch
21e81c087b feat(utils): add EmbedsBuilder.addFields() (#4077)
* feat(embed-builder): add addFields function

* feat(embed-builder): add tests for addField and addFields function

* Update packages/utils/src/builders/embeds.ts

Co-authored-by: Fleny <Fleny113@outlook.com>

* feat(embed-builder): add undefined check to addFields

* fix: make inline field optional in push

* revert: EmbedBuilder tsdoc rename

* Update packages/utils/src/builders/embeds.ts

Co-authored-by: Fleny <Fleny113@outlook.com>

* fix(embed-builder): expect inline to be undefined

* revert: outdated changes

* fix(embed-builder): fix embed unit test

* feat(embed-builder): add stickz jsdoc suggestions

---------

Co-authored-by: Fleny <Fleny113@outlook.com>
2024-12-30 16:06:51 -08:00
Dominik Koch
ceec87f3c7 fix: EmbedsBuilder missing s typo (#4078) 2024-12-30 19:05:13 +01:00
Fleny
2d02c3246c fix(website): Fix docusaurus build/typedoc warnings (#3929)
* Fix docusaurus build/typedoc warnings

* include the jsdoc fixes
2024-10-22 16:48:06 +02:00
dependabot[bot]
a2d6ae836e build(deps-dev): bump eslint-config-standard-with-typescript from 42.0.0 to 43.0.0 (#3318)
* build(deps-dev): bump eslint-config-standard-with-typescript

Bumps [eslint-config-standard-with-typescript](https://github.com/standard/eslint-config-standard-with-typescript) from 42.0.0 to 43.0.0.
- [Release notes](https://github.com/standard/eslint-config-standard-with-typescript/releases)
- [Changelog](https://github.com/standard/eslint-config-standard-with-typescript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/standard/eslint-config-standard-with-typescript/compare/v42.0.0...v43.0.0)

---
updated-dependencies:
- dependency-name: eslint-config-standard-with-typescript
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix lint error

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Fleny <fleny113@outlook.com>
2023-12-18 13:33:56 +00:00
Matthew Hatcher
9f5e3ab9ff feat(utils): add embed builder (#3145)
* 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
2023-10-06 03:54:11 +00:00