Methods
build()
build(): Promise<{ text: string; type: "text" } | { markdown: string; type: "markdown" } | { format: "markdown" | "plain"; stream: () => AsyncIterable<string>; type: "streamText" } | { raw: unknown; type: "custom" } | { id: string; mimeType: string; name: string; read: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>; size: number; stream: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>; type: "attachment" } | { addresses: { city: string; country: string; postalCode: string; region: string; street: string; type: "home" | "work" | "other" }[]; birthday: string; emails: { type: "home" | "work" | "other"; value: string }[]; name: { first: string; formatted: string; last: string; middle: string; prefix: string; suffix: string }; note: string; org: { department: string; name: string; title: string }; phones: { type: "mobile" | "home" | "work" | "other"; value: string }[]; photo: { mimeType: string; read: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>> }; raw: unknown; type: "contact"; urls: string[]; user: { __platform: string; id: string } } | { duration: number; id: string; mimeType: string; name: string; read: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>; size: number; stream: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>; type: "voice" } | { type: "richlink"; url: string } | { layout: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodObject<{ caption: ZodOptional<ZodString>; image: ZodOptional<ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>; imageSubtitle: ZodOptional<ZodString>; imageTitle: ZodOptional<ZodString>; subcaption: ZodOptional<ZodString>; summary: ZodOptional<ZodString>; trailingCaption: ZodOptional<ZodString>; trailingSubcaption: ZodOptional<ZodString> }, $strip>>>; live: boolean; type: "app"; url: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodURL>> } | { emoji: string; target: Message<string, User>; type: "reaction" } | { items: Message<string, User, Space<unknown>>[]; type: "group" } | { options: { title: string }[]; title: string; type: "poll" } | { option: { title: string }; poll: { options: { title: string }[]; title: string; type: "poll" }; selected: boolean; title: string; type: "poll_option" } | { content: { text: string; type: "text" } | { markdown: string; type: "markdown" } | { id: string; mimeType: string; name: string; read: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>; size: number; stream: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>; type: "attachment" }; effect: string; type: "effect" } | { state: "start" | "stop"; type: "typing" } | { displayName: string; type: "rename" } | { action: { kind: "set"; mimeType: string; read: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>> } | { kind: "clear" }; type: "avatar" } | { members: string[]; type: "addMember" } | { members: string[]; type: "removeMember" } | { type: "leaveSpace" } | { content: { markdown: string; type: "markdown" } | { addresses: { city: string; country: string; postalCode: string; region: string; street: string; type: "home" | "work" | "other" }[]; birthday: string; emails: { type: "home" | "work" | "other"; value: string }[]; name: { first: string; formatted: string; last: string; middle: string; prefix: string; suffix: string }; note: string; org: { department: string; name: string; title: string }; phones: { type: "mobile" | "home" | "work" | "other"; value: string }[]; photo: { mimeType: string; read: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodCustom<Buffer<...>, Buffer<...>>>> }; raw: unknown; type: "contact"; urls: string[]; user: { __platform: string; id: string } } | { raw: unknown; type: "custom" } | { text: string; type: "text" } | { id: string; mimeType: string; name: string; read: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>; size: number; stream: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>; type: "attachment" } | { layout: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodObject<{ caption: ZodOptional<ZodString>; image: ZodOptional<ZodCustom<..., ...>>; imageSubtitle: ZodOptional<ZodString>; imageTitle: ZodOptional<ZodString>; subcaption: ZodOptional<ZodString>; summary: ZodOptional<ZodString>; trailingCaption: ZodOptional<ZodString>; trailingSubcaption: ZodOptional<ZodString> }, $strip>>>; live: boolean; type: "app"; url: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodURL>> } | { items: Message<string, User, Space<unknown>>[]; type: "group" } | { type: "richlink"; url: string } | { duration: number; id: string; mimeType: string; name: string; read: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>; size: number; stream: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>; type: "voice" } | { options: { title: string }[]; title: string; type: "poll" } | { option: { title: string }; poll: { options: { title: string }[]; title: string; type: "poll" }; selected: boolean; title: string; type: "poll_option" } | { emoji: string; target: Message<string, User, Space<unknown>>; type: "reaction" } | { format: "markdown" | "plain"; stream: () => AsyncIterable<string>; type: "streamText" } | { content: { markdown: string; type: "markdown" } | { text: string; type: "text" } | { id: string; mimeType: string; name: string; read: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodCustom<Buffer<...>, Buffer<...>>>>; size: number; stream: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodCustom<ReadableStream<...>, ReadableStream<...>>>>; type: "attachment" }; effect: string; type: "effect" } | { state: "start" | "stop"; type: "typing" } | { displayName: string; type: "rename" } | { action: { kind: "set"; mimeType: string; read: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodCustom<Buffer<...>, Buffer<...>>>> } | { kind: "clear" }; type: "avatar" } | { members: string[]; type: "addMember" } | { members: string[]; type: "removeMember" } | { type: "leaveSpace" }; target: Message<string, User>; type: "reply" } | { content: { markdown: string; type: "markdown" } | { addresses: { city: string; country: string; postalCode: string; region: string; street: string; type: "home" | "work" | "other" }[]; birthday: string; emails: { type: "home" | "work" | "other"; value: string }[]; name: { first: string; formatted: string; last: string; middle: string; prefix: string; suffix: string }; note: string; org: { department: string; name: string; title: string }; phones: { type: "mobile" | "home" | "work" | "other"; value: string }[]; photo: { mimeType: string; read: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodCustom<Buffer<...>, Buffer<...>>>> }; raw: unknown; type: "contact"; urls: string[]; user: { __platform: string; id: string } } | { raw: unknown; type: "custom" } | { text: string; type: "text" } | { id: string; mimeType: string; name: string; read: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>; size: number; stream: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>; type: "attachment" } | { layout: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodObject<{ caption: ZodOptional<ZodString>; image: ZodOptional<ZodCustom<..., ...>>; imageSubtitle: ZodOptional<ZodString>; imageTitle: ZodOptional<ZodString>; subcaption: ZodOptional<ZodString>; summary: ZodOptional<ZodString>; trailingCaption: ZodOptional<ZodString>; trailingSubcaption: ZodOptional<ZodString> }, $strip>>>; live: boolean; type: "app"; url: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodURL>> } | { items: Message<string, User, Space<unknown>>[]; type: "group" } | { type: "richlink"; url: string } | { duration: number; id: string; mimeType: string; name: string; read: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>; size: number; stream: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>; type: "voice" } | { options: { title: string }[]; title: string; type: "poll" } | { option: { title: string }; poll: { options: { title: string }[]; title: string; type: "poll" }; selected: boolean; title: string; type: "poll_option" } | { emoji: string; target: Message<string, User, Space<unknown>>; type: "reaction" } | { format: "markdown" | "plain"; stream: () => AsyncIterable<string>; type: "streamText" } | { content: { markdown: string; type: "markdown" } | { text: string; type: "text" } | { id: string; mimeType: string; name: string; read: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodCustom<Buffer<...>, Buffer<...>>>>; size: number; stream: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodCustom<ReadableStream<...>, ReadableStream<...>>>>; type: "attachment" }; effect: string; type: "effect" } | { state: "start" | "stop"; type: "typing" } | { displayName: string; type: "rename" } | { action: { kind: "set"; mimeType: string; read: $InferOuterFunctionType<ZodTuple<readonly [], null>, ZodPromise<ZodCustom<Buffer<...>, Buffer<...>>>> } | { kind: "clear" }; type: "avatar" } | { members: string[]; type: "addMember" } | { members: string[]; type: "removeMember" } | { type: "leaveSpace" }; target: Message<string, User>; type: "edit" } | { target: Message<string, User>; type: "unsend" } | { target: Message<string, User>; type: "read" }>
Returns
MessageUserMessageUserSpaceMessageUserSpaceMessageUserSpaceMessageUserMessageUserSpaceMessageUserSpaceMessageUserMessageUserMessageUser