1.0.5 • Published 6 years ago

polylogger v1.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

PolyLogger

Send small messages and logs to yourself on telegram with no hassle

Getting Started

  • Create a Telegram bot with BotFather and take note of the telegram bot token provided

Prerequisites

  • Node.JS
  • NPM

Installing

Install from npm

npm i --save polylogger

or clone from this repo

git clone https://github.com/mullwar/telebot.git
cd polylogger
npm install

Usage

Import polylogger module and create a new connection object:

const Logger = require('polylogger');

const loggerBot = Logger({
    botToken: 'j89efj983u893', // This is the token provided by BotFather
    password: 'aStrongPassword' // This is the password you pass to the bot when subscribing for logs
});

// Sending info
loggerBot.sendInfo('Sending simple info from application');

// Sending error
loggerBot.sendError('Sending simple error from application');

Setting up the bot / Bot commands

  • Go to your bot on telegram
  • Send /echo to test if it's working. It should send back a message
  • Send /auth yourPassword to subscribe to logs. yourPassword is the password string you passed to polylogger when initializing

Built With

Contributions

PRs are welcome

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago