telegraf-getchatmembers

1.0.1 • Public • Published

Telegraf GetChatMembers

Node Version Downloads Travis

Implementation of getChatMembers method in Telegraf using cache

Installation

Module available through the npm registry. It can be installed using the npm or yarn command line tools.

# NPM 
npm install telegraf-getchatmembers --save
# Or Using Yarn 
yarn add telegraf-getchatmembers

Usage

const Telegraf = require('telegraf')
const telegrafGetChatMembers = require('telegraf-getchatmembers')
 
const bot = new Telegraf(process.env.telegram_token)
 
bot.use(telegrafGetChatMembers)
 
bot.on('message', async (ctx) => {
    ctx.getChatMembers(ctx.chat.id) //[Members]
    ctx.getChatMembers() //[Members]
    telegrafGetChatMembers.check(ctx.chat.id) //[Members]
    telegrafGetChatMembers.all //[Chats]
})
 
bot.launch()
 

Tests

To run the test suite, first install the dependencies, then run test:

# NPM 
npm test
# Or Using Yarn 
yarn test

Dependencies

None

Related

Contributors

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue. List of all contributors.

License

MIT © Tiago Danin

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i telegraf-getchatmembers

      Weekly Downloads

      13

      Version

      1.0.1

      License

      MIT

      Unpacked Size

      5.11 kB

      Total Files

      4

      Last publish

      Collaborators

      • tiagodanin