Commit Graph

3 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
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
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