Skip to content
GitHub

DeferOptions

interface in meocord/decorator Since 4.1.0

interface DeferOptions

How @Defer acknowledges an interaction and locks a component's message.

Members

ephemeral

ephemeral?: boolean

Makes a command's deferred reply private.

Default: false

suppressNotifications

suppressNotifications?: boolean

Sends new messages without notifying: the first reply, when there was time to answer before deferring, and follow-ups.

Default: false

disable

disable?: 'all' | 'clicked' | 'none'

Which controls of a component's message to disable while the handler runs: every one, the one clicked, or none, which also leaves out the loading view.

Default: 'all'

mode

mode?: 'eager' | 'auto'

When to acknowledge: 'eager' at once, or 'auto' only if nothing answered after after milliseconds, so a fast handler answers with a single reply. 'auto' suits a handler that waits on I/O: a timer cannot fire while synchronous work blocks the event loop.

Default: 'eager'

after

after?: number

How long 'auto' waits before acknowledging, in milliseconds. It never waits past 2.5 seconds after the interaction was created.

Default: 1500

See also