import { useSendMessage } from '@towns-protocol/react-sdk'
function useSendMessage( streamId: string, config?: ActionConfig<Channel["sendMessage"]>, ): { data: { eventId: string; } | undefined; error: Error | undefined; isPending: boolean; isSuccess: boolean; isError: boolean; sendMessage: (message: string, options?: { threadId?: string; replyId?: string; mentions?: PlainMessage<ChannelMessage.Post.Mention>[]; attachments?: PlainMessage<ChannelMessage.Post.Attachment>[]; } | undefined) => Promise<{ eventId: string; }>; }
string
ActionConfig<Channel["sendMessage"]>
{ data: { eventId: string; } | undefined; error: Error | undefined; isPending: boolean; isSuccess: boolean; isError: boolean; sendMessage: (message: string, options?: { threadId?: string; replyId?: string; mentions?: PlainMessage<ChannelMessage.Post.Mention>[]; attachments?: PlainMessage<ChannelMessage.Post.Attachment>[]; } | undefined) => Promise<{ eventId: string; }>; }
Was this page helpful?