1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-29 22:27:42 +02:00
Files
OpenIntegrations/docs/en/md/Telegram/Administration/Get-participant-count.mdx
Vitaly the Alpaca (bot) 408473f4ec Main build (Jenkins)
2025-06-29 14:35:33 +03:00

68 lines
1.6 KiB
Plaintext
Vendored

---
sidebar_position: 6
description: Get participant count and other functions to work with Telegram in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Telegram]
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get participant count
Gets the total number of chat participants
`Function GetParticipantCount(Val Token, Val ChatID) Export`
| Parameter | CLI option | Type | Required | 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="1C:Enterprise/OneScript code example"
Token = "6129457865:AAFyzNYOAFbu...";
ChannelID = "@testsichee";
Result = OPI_Telegram.GetParticipantCount(Token, ChannelID);
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint telegram GetParticipantCount \
--token "***" \
--chat "@testsichee"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint telegram GetParticipantCount ^
--token "***" ^
--chat "@testsichee"
```
</TabItem>
</Tabs>
```json title="Result"
{
"ok": true,
"result": 2
}
```