README
Telegraf GetChatMembers
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
- telegraf-start-parts: Command /start parameters parser middleware for Telegraf
- telegraf-test: Telegraf Test - Simple Test ToolKit of Telegram Bots
Contributors
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue. List of all contributors.