MCPcopy
hub / github.com/claude-code-best/claude-code / sendText

Function sendText

packages/weixin/src/send.ts:65–89  ·  view source on GitHub ↗
(params: {
  to: string
  text: string
  baseUrl: string
  token: string
  contextToken: string
})

Source from the content-addressed store, hash-verified

63}
64
65export async function sendText(params: {
66 to: string
67 text: string
68 baseUrl: string
69 token: string
70 contextToken: string
71}): Promise<{ messageId: string }> {
72 const clientId = randomUUID()
73 await sendMessage(params.baseUrl, params.token, {
74 to_user_id: params.to,
75 from_user_id: '',
76 client_id: clientId,
77 message_type: MessageType.BOT,
78 message_state: MessageState.FINISH,
79 context_token: params.contextToken,
80 item_list: [
81 {
82 type: MessageItemType.TEXT,
83 text_item: { text: markdownToPlainText(params.text) },
84 },
85 ],
86 })
87
88 return { messageId: clientId }
89}
90
91async function sendItems(params: {
92 items: MessageItem[]

Callers 3

processMessageFunction · 0.70
createWeixinMcpServerFunction · 0.70
runWeixinMcpServerFunction · 0.70

Calls 2

markdownToPlainTextFunction · 0.85
sendMessageFunction · 0.70

Tested by

no test coverage detected