API library for VamUved, service for developers for delivering simple notifications about your program.
npm i vamuved
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(...)