File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/commandkit/src/components Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export type CommandKitButtonBuilderInteractionCollectorDispatch = (
18
18
interaction : ButtonInteraction ,
19
19
) => Awaitable < void > ;
20
20
21
- export type CommandKitButtonBuilderOnEnd = ( ) => Awaitable < void > ;
21
+ export type CommandKitButtonBuilderOnEnd = ( reason : string ) => Awaitable < void > ;
22
22
23
23
export type CommandKitButtonBuilderInteractionCollectorDispatchContextData = {
24
24
/**
@@ -156,15 +156,15 @@ export class ButtonKit extends ButtonBuilder {
156
156
return handler ( interaction ) ;
157
157
} ) ;
158
158
159
- this . #collector. on ( 'end' , ( ) => {
159
+ this . #collector. on ( 'end' , ( _ , reason ) => {
160
160
this . #destroyCollector( ) ;
161
- this . #onEndHandler?.( ) ;
161
+ this . #onEndHandler?.( reason ) ;
162
162
} ) ;
163
163
}
164
164
165
165
public dispose ( ) {
166
166
this . #destroyCollector( ) ;
167
- this . #onEndHandler?.( ) ;
167
+ this . #onEndHandler?.( 'disposed' ) ;
168
168
return this ;
169
169
}
170
170
You can’t perform that action at this time.
0 commit comments