builders
builders copied to clipboard
feat(MessageButton): builder and associated interfaces
The MessageButton builder, in TypeScript
- Builder class for Message Buttons
- Interfaces and types
- Some Util functions as static methods that would probably belong better elsewhere
- Added
owas a dependency to validate input - Tests
This is a draft for now for a few reasons:
- Unsure if it needs to extend a base component class or not
- It's the first time I've used jest for anything, so will need advise/reviews on the tests
- I've re-written a lot of types that could just be imported from
discord-api-types, but it would require bumping the dependency version to 0.19
Status and versioning classification: TBD
Codecov Report
Merging #6 (2aea829) into main (97cf337) will not change coverage. The diff coverage is
100.00%.
@@ Coverage Diff @@
## main #6 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 2 +1
Lines 12 61 +49
Branches 4 19 +15
=========================================
+ Hits 12 61 +49
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/components/MessageButton.ts | 100.00% <100.00%> (ø) |
|
| src/messages/formatters.ts | 100.00% <0.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 97cf337...2aea829. Read the comment docs.