@@ -44,6 +44,11 @@ type InteractiveComponent interface {
44
44
interactiveComponent ()
45
45
}
46
46
47
+ type InputComponent interface {
48
+ InteractiveComponent
49
+ inputComponent ()
50
+ }
51
+
47
52
type UnmarshalComponent struct {
48
53
Component
49
54
}
@@ -141,12 +146,12 @@ func (c *ActionRowComponent) UnmarshalJSON(data []byte) error {
141
146
return nil
142
147
}
143
148
144
- func (c ActionRowComponent ) Type () ComponentType {
149
+ func (ActionRowComponent ) Type () ComponentType {
145
150
return ComponentTypeActionRow
146
151
}
147
152
148
- func (c ActionRowComponent ) component () {}
149
- func (c ActionRowComponent ) containerComponent () {}
153
+ func (ActionRowComponent ) component () {}
154
+ func (ActionRowComponent ) containerComponent () {}
150
155
151
156
func (c ActionRowComponent ) Components () []InteractiveComponent {
152
157
return c
@@ -276,7 +281,7 @@ func (c ButtonComponent) MarshalJSON() ([]byte, error) {
276
281
})
277
282
}
278
283
279
- func (c ButtonComponent ) Type () ComponentType {
284
+ func (ButtonComponent ) Type () ComponentType {
280
285
return ComponentTypeButton
281
286
}
282
287
@@ -289,8 +294,8 @@ func (c ButtonComponent) SetID(id CustomID) InteractiveComponent {
289
294
return c
290
295
}
291
296
292
- func (c ButtonComponent ) component () {}
293
- func (c ButtonComponent ) interactiveComponent () {}
297
+ func (ButtonComponent ) component () {}
298
+ func (ButtonComponent ) interactiveComponent () {}
294
299
295
300
// WithStyle returns a new ButtonComponent with the provided style
296
301
func (c ButtonComponent ) WithStyle (style ButtonStyle ) ButtonComponent {
@@ -375,7 +380,7 @@ func (c SelectMenuComponent) MarshalJSON() ([]byte, error) {
375
380
})
376
381
}
377
382
378
- func (c SelectMenuComponent ) Type () ComponentType {
383
+ func (SelectMenuComponent ) Type () ComponentType {
379
384
return ComponentTypeSelectMenu
380
385
}
381
386
@@ -388,8 +393,8 @@ func (c SelectMenuComponent) SetID(id CustomID) InteractiveComponent {
388
393
return c
389
394
}
390
395
391
- func (c SelectMenuComponent ) component () {}
392
- func (c SelectMenuComponent ) interactiveComponent () {}
396
+ func (SelectMenuComponent ) component () {}
397
+ func (SelectMenuComponent ) interactiveComponent () {}
393
398
394
399
// WithCustomID returns a new SelectMenuComponent with the provided customID
395
400
func (c SelectMenuComponent ) WithCustomID (customID CustomID ) SelectMenuComponent {
@@ -515,6 +520,7 @@ func (o SelectMenuOption) WithDefault(defaultOption bool) SelectMenuOption {
515
520
var (
516
521
_ Component = (* TextInputComponent )(nil )
517
522
_ InteractiveComponent = (* TextInputComponent )(nil )
523
+ _ InputComponent = (* TextInputComponent )(nil )
518
524
)
519
525
520
526
//goland:noinspection GoUnusedExportedFunction
@@ -558,7 +564,7 @@ func (c TextInputComponent) MarshalJSON() ([]byte, error) {
558
564
})
559
565
}
560
566
561
- func (c TextInputComponent ) Type () ComponentType {
567
+ func (TextInputComponent ) Type () ComponentType {
562
568
return ComponentTypeTextInput
563
569
}
564
570
@@ -571,8 +577,9 @@ func (c TextInputComponent) SetID(id CustomID) InteractiveComponent {
571
577
return c
572
578
}
573
579
574
- func (c TextInputComponent ) component () {}
575
- func (c TextInputComponent ) interactiveComponent () {}
580
+ func (TextInputComponent ) component () {}
581
+ func (TextInputComponent ) interactiveComponent () {}
582
+ func (TextInputComponent ) inputComponent () {}
576
583
577
584
// WithCustomID returns a new SelectMenuComponent with the provided customID
578
585
func (c TextInputComponent ) WithCustomID (customID CustomID ) TextInputComponent {
0 commit comments