1.0.9 • Published 8 years ago

auth-tg v1.0.9

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

auth-tg

Simple Auth Middleware (node-telegram-bot-api)

npm npm

Install

npm i --save auth-tg

Usage

var TelegramBot = require('node-telegram-bot-api');
var auth = require('auth-tg');

// telegram bot
var bot = new TelegramBot(token);

// secure bot
var secure = auth.wrap(bot, [/* array of id */]);

Functions

wrap(bot, authorized)

  • bot: node-telegram-bot-api bot.
  • authorized: array of authorized id.

Return wrapped bot.

Secure Functions

onText

Secure Events

Subset of events

  • auth@message
  • auth@text
  • auth@audio
  • auth@document,
  • auth@photo
  • auth@sticker
  • auth@video
  • auth@voice
  • auth@contact
  • auth@location
  • auth@callback_query
  • auth@inline_query
  • auth@chosen_inline_result
  • auth@edited_message

Author

Francesco Cannizzaro

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago