deno Telegram bot
tiny library for receive and sending telegram messages.
Usage
first you need to import Bot
from library.ts
then
import { Bot } from 'https://deno.land/x/telegram_bot@0.1.2/mod.ts
use like this:
// create bot instance
const bot = Bot(TOKEN);
// register event handler
bot.on('message', (message, response) => {
// message is telegram's message object
// response is an object which has sendMessage method.
// you can send message like this:
response.sendMessage({chatId: message.chat.id, text: "Hello"})
})
that's It for now!
thanks for checking this repository.
Licence
MIT