vamuved
v2.0.3
Published
Library for sending notifications via VamUved
Downloads
4
Readme
VamUved
API library for VamUved, service for developers for delivering simple notifications about your program.
Installation
npm i vamuved
Usage
Get new channelId
from Telegram bot that you want to deliver you notifications.
import vamuved from 'vamuved'
// ...
// second argument is optional
await vamuved.send('5fbc2c25a5efd72bf4f503a1', 'hello world!!!')
Error handling:
try {
await vamuved.send('5fbc2c25a5efd72bf4f503a1')
console.log('done')
} catch (e) {
console.log(e) // Error: Invalid channel
}
Set hosthame for custom VamUved server:
import vamuved from 'vamuved'
vamuved.setHosthame('example.com')
await vamuved.send(...)