(name: string, text = "", extra?: Record<string, unknown>)
| 155 | |
| 156 | /** A command message, with its `bot_command` entity. */ |
| 157 | export 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. */ |
| 165 | export const callbackUpdate = (message: Record<string, unknown>, data: string) => ({ |
no test coverage detected