Skip to main content
Use reply() to send a threaded reply by wrapping content with the message being replied to. See Reactions and replies for the full details and sugar methods.
import { reply, text } from "spectrum-ts";

await space.send(reply(text("Got it"), message));
reply() cannot wrap reply, edit, reaction, group, typing, rename, avatar, or unsend content.

Reply sugar

message.reply(...) has the same variadic signature and delegates to space.send(reply(...)) internally:
await message.reply(
  "Thanks for the question.",
  attachment("/path/to/answer.png"),
);
On platforms without thread support, reply() resolves as a no-op. If you need guaranteed delivery, use space.send(...) instead.