https://github.com/tiagodanin/telegraf-getchatmembers
Implementation of getChatMembers method in Telegraf using cache
https://github.com/tiagodanin/telegraf-getchatmembers
javascript-library telegraf telegraf-middleware telegraf-plugin telegram-bot
Last synced: 29 days ago
JSON representation
Implementation of getChatMembers method in Telegraf using cache
- Host: GitHub
- URL: https://github.com/tiagodanin/telegraf-getchatmembers
- Owner: TiagoDanin
- License: mit
- Created: 2019-04-10T12:37:38.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-05-28T19:21:08.000Z (about 1 year ago)
- Last Synced: 2024-05-29T10:23:20.144Z (about 1 year ago)
- Topics: javascript-library, telegraf, telegraf-middleware, telegraf-plugin, telegram-bot
- Language: JavaScript
- Homepage:
- Size: 18.6 KB
- Stars: 7
- Watchers: 3
- Forks: 3
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Telegraf GetChatMembers
[](https://npmjs.org/package/telegraf-getchatmembers)
[](https://npmjs.org/package/telegraf-getchatmembers)
[](https://npmjs.org/package/telegraf-getchatmembers)
[](https://travis-ci.org/TiagoDanin/Telegraf-GetChatMembers)Implementation of getChatMembers method in Telegraf using cache
## Installation
Module available through the
[npm registry](https://www.npmjs.com/). It can be installed using the
[`npm`](https://docs.npmjs.com/getting-started/installing-npm-packages-locally)
or
[`yarn`](https://yarnpkg.com/en/)
command line tools.```sh
# NPM
npm install telegraf-getchatmembers --save
# Or Using Yarn
yarn add telegraf-getchatmembers
```## Usage
```js
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`:```sh
# NPM
npm test
# Or Using Yarn
yarn test
```## Dependencies
None## Related
- [telegraf-start-parts](https://ghub.io/telegraf-start-parts): Command /start parameters parser middleware for Telegraf
- [telegraf-test](https://ghub.io/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](https://github.com/TiagoDanin/Telegraf-GetChatMembers/issues). [List of all contributors](https://github.com/TiagoDanin/Telegraf-GetChatMembers/graphs/contributors).## License
[MIT](LICENSE) © [Tiago Danin](https://TiagoDanin.github.io)