Skip to content
GitHub

EmitResult

interface in meocord/testing Since 4.1.0

interface EmitResult

How an event sent with TestingModule.emit was handled.

Members

ran

ran: number

How many @On and @Once handlers ran; a handler a guard denied is not counted. A guard that throws GuardDeniedError rejects emit instead, unless the module has eventFallback: true, which skips the event as the bot does.

error Since 4.3.0

error?: unknown

Set only for an event that didn't start: one emitted while init() ran, which a close() then ended. It is an error with the message "The bot stopped before this call started.", and ran is 0. Every other event resolves with ran alone.