DispatchResult
interface in meocord/interface Since 4.1.0
interface DispatchResultWhat a DispatchObserver is told about a call once it has settled.
Members
outcome
outcome: DispatchOutcomeHow the call ended.
startedAt
startedAt: numberWhen dispatch received the call, in milliseconds since the Unix epoch.
durationMs
durationMs: numberHow long the call took, in milliseconds from performance.now(): from dispatch until the filters
and the fallback had answered, so it includes an error's answer.
deniedBy
deniedBy?: abstract new (...args: any[]) => unknownThe guard class that denied the call, whether it returned false or threw GuardDeniedError.
Only with the outcome 'denied', and not for a GuardDeniedError the handler threw itself.
response
response?: 'replied' | 'deferred' | 'unanswered'Where the interaction's answer stood once the call settled: 'replied', 'deferred' (deferred and
never followed up, which leaves the user waiting) or 'unanswered'. An autocomplete is 'replied'
once it answered. Only for interactions; undefined for messages, reactions and events.
error
error?: unknownThe error the call ended with, for 'denied' by GuardDeniedError, 'cooldown', 'invalid', 'refused', 'error' and most 'not-found'.
handled
handled: booleanWhether an exception filter or the built-in fallback answered the error. false without an error.