UNPKG

telegram-bot-api-wrapper

Version:

A simple wrapper for the Telegram Bot API. Just provide your bot token and start using it.

8 lines 400 B
import sendMessage from "./actions/sendMessage"; import sendKeyboard from "./actions/sendKeyboard"; export default function telegramBotAPI(token: string) { return { sendMessage: (chatId: number, text: string) => sendMessage(token, chatId, text), sendKeyboard: (chatId: number, text: string, keyboard: []) => sendKeyboard(token, chatId, text, keyboard), }; }