Quick Start
HTTP Client
npm install @effect-ak/tg-bot-clientimport { makeTgBotClient } from "@effect-ak/tg-bot-client"
const client = makeTgBotClient({ bot_token: "YOUR_BOT_TOKEN"})
const result = await client.execute("send_message", { chat_id: "123456789", text: "Hello, World!"})
if (result.ok) { console.log("Sent:", result.data.message_id)}Bot Runner
npm install @effect-ak/tg-botimport { createBot } from "@effect-ak/tg-bot"
createBot() .onMessage(({ command, text }) => [ command("/start", ({ ctx }) => ctx.reply("Welcome!")), text(({ update, ctx }) => ctx.reply(`You said: ${update.text}`)) ]) .run({ bot_token: "YOUR_BOT_TOKEN" })API Types only
If you only need TypeScript type definitions:
npm install @effect-ak/tg-bot-api