-
-
Notifications
You must be signed in to change notification settings - Fork 37
feat: Add Components #63
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## main #63 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 21 27 +6
Lines 306 423 +117
Branches 42 51 +9
==========================================
+ Hits 306 423 +117
Continue to review full report at Codecov.
|
d10e90c
to
c798e65
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I semi-understand the split between link button and interaction button but personally I'd rather have one Button class that then changes its type based on what you set in the style (so something like <S extends ButtonStyle>(style: S): S extends ButtonStyle.Link ? Omit<this, 'setCustomId' | 'whateverElse'>& Pick<ButtonComponent, 'setUrl'> : Omit<this, 'setUrl'> & Pick<ButtonComponent<T>, 'setCustomId', 'whatever'>
, of course simplifying the types like I did for the slashcommandbuilder (where it has a subcommandsonly and options only type)
Please describe the changes this PR makes and why it should be merged:
Adds
SelectMenuComponent
,ButtonComponent
andActionRow<T>
Status and versioning classification: