MCPcopy Create free account
hub / github.com/Effect-TS/effect / commandUpdate

Function commandUpdate

packages/chat/telegram/test/utils.ts:157–162  ·  view source on GitHub ↗
(name: string, text = "", extra?: Record<string, unknown>)

Source from the content-addressed store, hash-verified

155
156/** A command message, with its `bot_command` entity. */
157export const commandUpdate = (name: string, text = "", extra?: Record<string, unknown>) =>
158 messageUpdate({
159 text: text === "" ? `/${name}` : `/${name} ${text}`,
160 entities: [{ type: "bot_command", offset: 0, length: name.length + 1 }],
161 ...extra
162 })
163
164/** A click on `data` from `user`, on the message as Telegram keeps it. */
165export const callbackUpdate = (message: Record<string, unknown>, data: string) => ({

Callers 2

makeInteractionsFunction · 0.85

Calls 1

messageUpdateFunction · 0.85

Tested by

no test coverage detected