1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-12-07 23:03:08 +02:00
Files
OpenIntegrations/docs/en/md/Telegram/Administration/Get-participant-count.mdx

47 lines
842 B
Plaintext
Raw Normal View History

2024-10-15 10:50:56 +03:00
---
2024-10-15 10:16:04 +03:00
sidebar_position: 6
---
2024-10-15 10:50:56 +03:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2024-10-15 10:16:04 +03:00
# Get participant count
Gets the total number of chat participants
`Function GetParticipantCount(Val Token, Val ChatID) Export`
| Parameter | CLI option | Type | Description |
|-|-|-|-|
| Token | --token | String | Bot token |
| ChatID | --chat | String, Number | Target chat ID |
Returns: Map Of KeyAndValue - serialized JSON response from Telegram
<br/>
:::tip
Method at API documentation: [getChatMemberCount](https://core.telegram.org/bots/api#getchatmembercount)
:::
<br/>
```bsl title="Code example"
Token = "6129457865:AAFyzNYOAFbu...";
ChannelID = "@testsichee";
Result = OPI_Telegram.GetParticipantCount(Token, ChannelID);
```
```json title="Result"
{
"ok": true,
"result": 2
}
```