vamuved

Library for sending notifications via VamUved

Usage no npm install needed!

<script type="module">
  import vamuved from 'https://cdn.skypack.dev/vamuved';
</script>

README

Strict TypeScript Checked JavaScript Style Guide

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(...)