Skip to content
Telegram Bot Logger
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
helpers.js
index.js
package-lock.json
package.json

README.md

Telegram Bot Logger

Good for logging your actions to Telegram chat/group/supergroup. Now supports sending String type of messages only (also supports Markdown).

Install

  1. Create bot and get bot token from @botfather;
  2. (optional) Add your bot to group/supergroup and make it an admin without any admin permissions (bot need to read the first message);
  3. npm i -s tglogger

Use

Send the bot command /start to bot or just write something to the group/supergroup to which you added the bot. Bot will send you message when it will save chatId.

const TgLogger = require('tglogger');
const tg = new TgLogger('TELEGRAM_BOT_TOKEN');

tg.text('_Lorem_ *ipsum* \`dolor\`.');
tg.info('_Lorem_ *ipsum* \`dolor\`.');
tg.err('_Lorem_ *ipsum* \`dolor\`.');
tg.warn('_Lorem_ *ipsum* \`dolor\`.');
tg.failed();
tg.failed('_Lorem_ *ipsum* \`dolor\`.');
tg.success();
tg.success('_Lorem_ *ipsum* \`dolor\`.');

Commands

/connect

Use to connect bot to the chat/group/supergroup.

/disconnect

Use to disconnect from the chat/group/supergroup.

You can’t perform that action at this time.