Appearance
@mastondzn/dank-twitch-irc / AwaitConfig
Interface: AwaitConfig
Defined in: src/await/await-response.ts:14
Properties
errorMessage
errorMessage:
string
Defined in: src/await/await-response.ts:62
Custom error message to pass to the errorType function as the message, preferably about what kind of response to what input variables was awaited (e.g. channel name)
errorType()
errorType: (
message,cause?) =>Error
Defined in: src/await/await-response.ts:55
Function to create custom error type given optional message and cause error.
Parameters
message
string
Optional message
cause?
Error
Optional cause
Returns
Error
failure?
optionalfailure:Condition
Defined in: src/await/await-response.ts:25
If this condition evaluates to true on any incoming message, the promise is rejected with an error specifying the cause message.
noResponseAction?
optionalnoResponseAction:NoResponseAction
Defined in: src/await/await-response.ts:46
Action to take after
a timeout occurs or
a response awaited later than this response is resolved or rejected (and given that since the server processes commands and sends their responses strictly sequentially) this response would never be fulfilled because the server is done processing this command
E.g. the client issues
JOIN #a,#b,#cto the server, and receives the responses foraandc, in that order. In that case, the response forbcan be rejected the moment the response forcis received.
success?
optionalsuccess:Condition
Defined in: src/await/await-response.ts:19
If this condition evaluates to true on any incoming message, the promise is resolved with the message that matched.
timeout?
optionaltimeout:number
Defined in: src/await/await-response.ts:31
If neither the success or failure condition match on any message within this period (after connection, noResponseAction is taken.