Powerful
Node.js
package that allows you to
easily
interact with
Telegram API
🚀
Features
- 100% Telegram Bot API coverage
- Works with JavaScript and TypeScript
- Has 57 tests and all of them passes every build
Installation
Node.js 12.0.0 or newer is required
$ yarn add puregram
$ npm i -S puregram
Example usage
import { Telegram } from 'puregram';
const telegram = new Telegram({
token: process.env.TOKEN
});
telegram.updates.on(
'message',
(context) => context.send('Hello, World!')
);
telegram.updates.on(
'callback_query',
(context) => (
context.message.editMessageText('*You just clicked the inline button!*', {
parse_mode: 'Markdown'
})
)
);
telegram.updates.startPolling().catch(console.error);
🤖 Click to see more examples!
Packages that might be useful to you
Thanks to
Biggest thanks to Negezor for his vk-io library that helped me with this package!
Social