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 = (
1818 interaction : ButtonInteraction ,
1919) => Awaitable < void > ;
2020
21- export type CommandKitButtonBuilderOnEnd = ( ) => Awaitable < void > ;
21+ export type CommandKitButtonBuilderOnEnd = ( reason : string ) => Awaitable < void > ;
2222
2323export type CommandKitButtonBuilderInteractionCollectorDispatchContextData = {
2424 /**
@@ -156,15 +156,15 @@ export class ButtonKit extends ButtonBuilder {
156156 return handler ( interaction ) ;
157157 } ) ;
158158
159- this . #collector. on ( 'end' , ( ) => {
159+ this . #collector. on ( 'end' , ( _ , reason ) => {
160160 this . #destroyCollector( ) ;
161- this . #onEndHandler?.( ) ;
161+ this . #onEndHandler?.( reason ) ;
162162 } ) ;
163163 }
164164
165165 public dispose ( ) {
166166 this . #destroyCollector( ) ;
167- this . #onEndHandler?.( ) ;
167+ this . #onEndHandler?.( 'disposed' ) ;
168168 return this ;
169169 }
170170
You can’t perform that action at this time.
0 commit comments