Skip to content
This repository was archived by the owner on Nov 24, 2019. It is now read-only.

johnnykramer/tglogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram Bot Logger

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

Repo is abandoned. If you want to Make Repo Great Again — you still can fork it.

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.

About

Telegram Bot Logger

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published