Package Exports
- 0xalice-tgram-bot
- 0xalice-tgram-bot/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (0xalice-tgram-bot) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@vbase/telegram-bot
Batched Telegram notification bot for VBase.
Installation
yarn add @vbase/telegram-botUsage
import { TelegramBot } from '@vbase/telegram-bot';
const bot = new TelegramBot({
botToken: process.env.TELEGRAM_BOT_TOKEN!,
chatId: process.env.TELEGRAM_CHAT_ID!,
batchDelay: 60000, // optional, defaults to 60000
development: process.env.NODE_ENV === 'development' // optional
});
bot.info('Service started');
bot.warning('High memory usage');
bot.error('Database connection failed');