https://github.com/qertis/telegram-bot-activitystreams
Telegram Bot API Message ActivityStreams 2.0
https://github.com/qertis/telegram-bot-activitystreams
activity-streams activitystreams activitystreams-vocabulary telegram-activitystreams telegram-bot-api-activitystreams
Last synced: 4 months ago
JSON representation
Telegram Bot API Message ActivityStreams 2.0
- Host: GitHub
- URL: https://github.com/qertis/telegram-bot-activitystreams
- Owner: qertis
- License: mit
- Created: 2023-01-04T14:55:16.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-09-25T21:01:11.000Z (8 months ago)
- Last Synced: 2024-09-26T03:27:06.015Z (8 months ago)
- Topics: activity-streams, activitystreams, activitystreams-vocabulary, telegram-activitystreams, telegram-bot-api-activitystreams
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/telegram-bot-activitystreams
- Size: 35.2 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ActivityStreams 2.0 Telegram Bot Messages
Serialization telegram message into ActivityStreams.
- [Terms](https://www.w3.org/ns/activitystreams)
- [Specification](https://www.w3.org/TR/activitystreams-core)
- [Vocabulary](https://www.w3.org/TR/activitystreams-vocabulary)| Activity | Available |
|------------|-----------|
| summary | ✅ |
| instrument | ✅ |
| actor | ✅ |
| origin | ✅ |
| target | ✅ |
| origin | ✅ |
| startTime | ✅ |
| endTime | ✅ || Objects | Available |
|----------|-------------|
| Person | ✅ |
| Profile | ✅ |
| Note | ✅ |
| Audio | ✅ |
| Video | ✅ |
| Document | ✅ |
| Event | ✅ |
| Place | ✅ |## Example
> [node-telegram-bot-api](https://github.com/yagop/node-telegram-bot-api)```bash
npm i telegram-bot-activitystreams
``````javascript
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](https://github.com/qertis/telegram-bot-api-express).