DeferOptions
interface in meocord/decorator Since 4.1.0
interface DeferOptionsHow @Defer acknowledges an interaction and locks a component's message.
Members
ephemeral
ephemeral?: booleanMakes a command's deferred reply private. Under mode: 'auto', an acknowledgement sent while an answer waits for
its theme stands in for that answer's own reply, and is as private as that answer instead.
Default: false
suppressNotifications
suppressNotifications?: booleanSends 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 no answer has been sent to Discord after after
milliseconds, so a fast handler answers with a single reply. An answer still waiting for its theme, as from a slow
themeFor resolver, doesn't count: the acknowledgement goes first, as private as that answer, which then edits it
in. 'auto' suits a handler that waits on I/O: a timer cannot fire while synchronous work blocks the event loop.
Default: 'eager'
after
after?: numberHow long 'auto' waits before acknowledging, in milliseconds. It never waits past 2.5 seconds after the
interaction was created.
Default: 1500