@smoooookie/servar-telegram-bot
v1.0.2
Published
[](https://www.npmjs.com/package/@smoooookie/servar-telegram-bot)
Readme
@smoooookie/servar-telegram-bot
Bot for notifications.
Usage
npx @smoooookie/servar-telegram-bot -hEnvironment variables
All optional, command will ask you to prompt if not set.
# Telegram-token:
TELEGRAM_BOT_TOKEN=<string>
# Usernames of allowed to interact with bot users (any if empty):
TELEGRAM_BOT_WHITELIST=<string>
# Name of file that contains registered chats:
TELEGRAM_BOT_SUBSCRIBERS_PATH=<string>
# Name of file contains data:
DATA_PATH=<string>
# Command to start fetching data process:
FETCH_COMMAND=<string>Programmatically
npm i @smoooookie/servar-telegram-botimport { telegramBot } from "@smoooookie/servar-telegram-bot";
// Start bot:
await telegramBot.startPolling();
// Watch data:
await telegramBot.watchData();Api docs
See here.
