* Post a message only `user` can see. `fallbackToDM` is required: * `true` → DM the user when native ephemeral is unsupported; `false` → * resolve to `null` when native ephemeral is unsupported.
(
user: PlatformUser | string,
ui: Renderable,
opts: { fallbackToDM: boolean },
)
| 209 | * resolve to `null` when native ephemeral is unsupported. |
| 210 | */ |
| 211 | async postEphemeral( |
| 212 | user: PlatformUser | string, |
| 213 | ui: Renderable, |
| 214 | opts: { fallbackToDM: boolean }, |
| 215 | ): Promise<EphemeralResult | null> { |
| 216 | const adapter = this.deps.adapter; |
| 217 | if (!adapter.postEphemeral) { |
| 218 | return { |
| 219 | ok: false, |
| 220 | error: `${this.platform} does not support ephemeral messages`, |
| 221 | }; |
| 222 | } |
| 223 | // Ephemeral messages can't be reacted to, so any `onReaction` is dropped |
| 224 | // (stripped by bindForPost) rather than registered. |
| 225 | const { root } = await this.bindForPost(ui); |
| 226 | return adapter.postEphemeral(this.deps.replyTarget, user, root, opts); |
| 227 | } |
| 228 | |
| 229 | // Subscription STORAGE lands here; subscription ROUTING (onSubscribedMessage) is deferred. |
| 230 |
nothing calls this directly
no test coverage detected