About

Implementation of getChatMembers method in Telegraf using cache by Tiago Danin.


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

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


JavaScript

6