File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,8 @@ class API extends Core {
198
198
isBlocking = fnc ;
199
199
200
200
// run validation before any requests
201
- if ( ! ( await oauth . validateOAuth ( 'bot' ) || await oauth . validateOAuth ( 'broadcaster' ) ) ) {
201
+ const [ botValidation , broadcasterValidation ] = await Promise . all ( oauth . validateTokens ( ) ) ;
202
+ if ( ! botValidation || ! broadcasterValidation ) {
202
203
continue ;
203
204
}
204
205
Original file line number Diff line number Diff line change @@ -119,11 +119,14 @@ class OAuth extends Core {
119
119
120
120
@onStartup ( )
121
121
onStartup ( ) {
122
- this . validateOAuth ( 'bot' ) ;
123
- this . validateOAuth ( 'broadcaster' ) ;
122
+ this . validateTokens ( ) ;
124
123
this . getChannelId ( ) ;
125
124
}
126
125
126
+ validateTokens ( ) {
127
+ return [ this . validateOAuth ( 'bot' ) , this . validateOAuth ( 'broadcaster' ) ] ;
128
+ }
129
+
127
130
@onLoad ( 'broadcasterAccessToken' )
128
131
@onLoad ( 'botAccessToken' )
129
132
setBotAccessTokenLoaded ( ) {
You can’t perform that action at this time.
0 commit comments