File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ export interface runArgs {
7
7
onSuccess ?: onSuccessType
8
8
}
9
9
10
- type onSuccessType = ( tweet : Tweet ) => void ;
10
+ type onSuccessType = ( tweet : Tweet ) => Promise < void > ;
11
11
12
12
export abstract class AbstractAction {
13
13
config : BotConfig ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export default class Like extends AbstractAction {
19
19
this . debug ( 'Liked!' ) ;
20
20
21
21
if ( onSuccess ) {
22
- onSuccess ( tweet ) ;
22
+ await onSuccess ( tweet ) ;
23
23
}
24
24
} else {
25
25
this . debug ( 'Cannot like.' ) ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export default class Retweet extends AbstractAction {
19
19
this . debug ( 'Retweeted!' ) ;
20
20
21
21
if ( onSuccess ) {
22
- onSuccess ( tweet ) ;
22
+ await onSuccess ( tweet ) ;
23
23
}
24
24
} else {
25
25
this . debug ( 'Cannot retweet.' ) ;
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ export default class Search extends AbstractAction {
36
36
}
37
37
38
38
if ( args . onSuccess ) {
39
- args . onSuccess ( tweet ) ;
39
+ await args . onSuccess ( tweet ) ;
40
40
}
41
41
}
42
42
}
You can’t perform that action at this time.
0 commit comments