1.0.7 • Published 9 months ago

telegram-bot-activitystreams v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

ActivityStreams 2.0 Telegram Bot Messages

Serialization telegram message into ActivityStreams.

ActivityAvailable
summary
instrument
actor
origin
target
origin
startTime
endTime
ObjectsAvailable
Person
Profile
Note
Audio
Video
Document
Event
Place

Example

node-telegram-bot-api

npm i telegram-bot-activitystreams
const activitystreams = require('telegram-bot-activitystreams');
const TelegramBot = require('node-telegram-bot-api');

const token = 'YOUR_TELEGRAM_BOT_TOKEN';
const bot = new TelegramBot(token, {polling: true});

bot.on('message', (msg) => {
  const activity = activitystreams(msg);
  bot.sendMessage(msg.chat.id, 'Hello ' + activity.actor.name);
});

Works better with telegram-bot-api-express.