Update docs
This commit is contained in:
parent
fdfe18a0a6
commit
f2a3f460a6
@ -5,7 +5,9 @@ Do join the official channel, [@MadelineProto](https://t.me/MadelineProto)!
|
||||
|
||||
## What's this?
|
||||
|
||||
This library can be used to easily interact with Telegram without the bot API, just like the official apps.
|
||||
This library can be used to easily interact with Telegram **without** the bot API, just like the official apps.
|
||||
|
||||
It can login with a phone number (MTProto API), or with a bot token (MTProto API, **no bot API involved!**).
|
||||
|
||||
|
||||
## Installation
|
||||
|
@ -6,8 +6,86 @@ description: channels.getParticipants parameters, return type and example
|
||||
[Back to methods index](index.md)
|
||||
|
||||
|
||||
**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)**
|
||||
### Parameters:
|
||||
|
||||
| Name | Type | Required |
|
||||
|----------|---------------|----------|
|
||||
|channel|[InputChannel](../types/InputChannel.md) | Optional|
|
||||
|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes|
|
||||
|offset|[int](../types/int.md) | Yes|
|
||||
|limit|[int](../types/int.md) | Yes|
|
||||
|hash|[int](../types/int.md) | Yes|
|
||||
|
||||
|
||||
### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md)
|
||||
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||
|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|
||||
|Timeout|A timeout occurred while fetching data from the bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
```
|
||||
$MadelineProto = new \danog\MadelineProto\API();
|
||||
$MadelineProto->session = 'mySession.madeline';
|
||||
if (isset($token)) { // Login as a bot
|
||||
$MadelineProto->bot_login($token);
|
||||
}
|
||||
if (isset($number)) { // Login as a user
|
||||
$MadelineProto->phone_login($number);
|
||||
$code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API
|
||||
$MadelineProto->complete_phone_login($code);
|
||||
}
|
||||
|
||||
$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, 'hash' => int, ]);
|
||||
```
|
||||
|
||||
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
|
||||
|
||||
### As a bot:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
|
||||
|
||||
Parameters:
|
||||
|
||||
* method - channels.getParticipants
|
||||
* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, "hash": int, }`
|
||||
|
||||
|
||||
|
||||
### As a user:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants`
|
||||
|
||||
Parameters:
|
||||
|
||||
channel - Json encoded InputChannel
|
||||
|
||||
filter - Json encoded ChannelParticipantsFilter
|
||||
|
||||
offset - Json encoded int
|
||||
|
||||
limit - Json encoded int
|
||||
|
||||
hash - Json encoded int
|
||||
|
||||
|
||||
|
||||
|
||||
Or, if you're into Lua:
|
||||
|
||||
```
|
||||
channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, hash=int, })
|
||||
```
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
---
|
||||
title: MadelineProto documentation
|
||||
description: PHP implementation of telegram's MTProto protocol
|
||||
---
|
||||
# MadelineProto, a PHP MTProto telegram client
|
||||
|
||||
Do join the official channel, [@MadelineProto](https://t.me/MadelineProto)!
|
||||
@ -5,7 +9,9 @@ Do join the official channel, [@MadelineProto](https://t.me/MadelineProto)!
|
||||
|
||||
## What's this?
|
||||
|
||||
This library can be used to easily interact with Telegram without the bot API, just like the official apps.
|
||||
This library can be used to easily interact with Telegram **without** the bot API, just like the official apps.
|
||||
|
||||
It can login with a phone number (MTProto API), or with a bot token (MTProto API, **no bot API involved!**).
|
||||
|
||||
|
||||
## Installation
|
||||
|
@ -6,8 +6,83 @@ description: channels.getParticipants parameters, return type and example
|
||||
[Back to methods index](index.md)
|
||||
|
||||
|
||||
**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)**
|
||||
### Parameters:
|
||||
|
||||
| Name | Type | Required |
|
||||
|----------|---------------|----------|
|
||||
|channel|[InputChannel](../types/InputChannel.md) | Optional|
|
||||
|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes|
|
||||
|offset|[int](../types/int.md) | Yes|
|
||||
|limit|[int](../types/int.md) | Yes|
|
||||
|
||||
|
||||
### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md)
|
||||
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||
|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|
||||
|Timeout|A timeout occurred while fetching data from the bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
```
|
||||
$MadelineProto = new \danog\MadelineProto\API();
|
||||
$MadelineProto->session = 'mySession.madeline';
|
||||
if (isset($token)) { // Login as a bot
|
||||
$MadelineProto->bot_login($token);
|
||||
}
|
||||
if (isset($number)) { // Login as a user
|
||||
$MadelineProto->phone_login($number);
|
||||
$code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API
|
||||
$MadelineProto->complete_phone_login($code);
|
||||
}
|
||||
|
||||
$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]);
|
||||
```
|
||||
|
||||
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
|
||||
|
||||
### As a bot:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
|
||||
|
||||
Parameters:
|
||||
|
||||
* method - channels.getParticipants
|
||||
* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }`
|
||||
|
||||
|
||||
|
||||
### As a user:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants`
|
||||
|
||||
Parameters:
|
||||
|
||||
channel - Json encoded InputChannel
|
||||
|
||||
filter - Json encoded ChannelParticipantsFilter
|
||||
|
||||
offset - Json encoded int
|
||||
|
||||
limit - Json encoded int
|
||||
|
||||
|
||||
|
||||
|
||||
Or, if you're into Lua:
|
||||
|
||||
```
|
||||
channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, })
|
||||
```
|
||||
|
||||
|
@ -6,8 +6,83 @@ description: channels.getParticipants parameters, return type and example
|
||||
[Back to methods index](index.md)
|
||||
|
||||
|
||||
**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)**
|
||||
### Parameters:
|
||||
|
||||
| Name | Type | Required |
|
||||
|----------|---------------|----------|
|
||||
|channel|[InputChannel](../types/InputChannel.md) | Optional|
|
||||
|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes|
|
||||
|offset|[int](../types/int.md) | Yes|
|
||||
|limit|[int](../types/int.md) | Yes|
|
||||
|
||||
|
||||
### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md)
|
||||
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||
|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|
||||
|Timeout|A timeout occurred while fetching data from the bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
```
|
||||
$MadelineProto = new \danog\MadelineProto\API();
|
||||
$MadelineProto->session = 'mySession.madeline';
|
||||
if (isset($token)) { // Login as a bot
|
||||
$MadelineProto->bot_login($token);
|
||||
}
|
||||
if (isset($number)) { // Login as a user
|
||||
$MadelineProto->phone_login($number);
|
||||
$code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API
|
||||
$MadelineProto->complete_phone_login($code);
|
||||
}
|
||||
|
||||
$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]);
|
||||
```
|
||||
|
||||
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
|
||||
|
||||
### As a bot:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
|
||||
|
||||
Parameters:
|
||||
|
||||
* method - channels.getParticipants
|
||||
* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }`
|
||||
|
||||
|
||||
|
||||
### As a user:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants`
|
||||
|
||||
Parameters:
|
||||
|
||||
channel - Json encoded InputChannel
|
||||
|
||||
filter - Json encoded ChannelParticipantsFilter
|
||||
|
||||
offset - Json encoded int
|
||||
|
||||
limit - Json encoded int
|
||||
|
||||
|
||||
|
||||
|
||||
Or, if you're into Lua:
|
||||
|
||||
```
|
||||
channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, })
|
||||
```
|
||||
|
||||
|
@ -6,8 +6,83 @@ description: channels.getParticipants parameters, return type and example
|
||||
[Back to methods index](index.md)
|
||||
|
||||
|
||||
**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)**
|
||||
### Parameters:
|
||||
|
||||
| Name | Type | Required |
|
||||
|----------|---------------|----------|
|
||||
|channel|[InputChannel](../types/InputChannel.md) | Optional|
|
||||
|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes|
|
||||
|offset|[int](../types/int.md) | Yes|
|
||||
|limit|[int](../types/int.md) | Yes|
|
||||
|
||||
|
||||
### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md)
|
||||
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||
|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|
||||
|Timeout|A timeout occurred while fetching data from the bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
```
|
||||
$MadelineProto = new \danog\MadelineProto\API();
|
||||
$MadelineProto->session = 'mySession.madeline';
|
||||
if (isset($token)) { // Login as a bot
|
||||
$MadelineProto->bot_login($token);
|
||||
}
|
||||
if (isset($number)) { // Login as a user
|
||||
$MadelineProto->phone_login($number);
|
||||
$code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API
|
||||
$MadelineProto->complete_phone_login($code);
|
||||
}
|
||||
|
||||
$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]);
|
||||
```
|
||||
|
||||
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
|
||||
|
||||
### As a bot:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
|
||||
|
||||
Parameters:
|
||||
|
||||
* method - channels.getParticipants
|
||||
* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }`
|
||||
|
||||
|
||||
|
||||
### As a user:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants`
|
||||
|
||||
Parameters:
|
||||
|
||||
channel - Json encoded InputChannel
|
||||
|
||||
filter - Json encoded ChannelParticipantsFilter
|
||||
|
||||
offset - Json encoded int
|
||||
|
||||
limit - Json encoded int
|
||||
|
||||
|
||||
|
||||
|
||||
Or, if you're into Lua:
|
||||
|
||||
```
|
||||
channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, })
|
||||
```
|
||||
|
||||
|
@ -6,8 +6,83 @@ description: channels.getParticipants parameters, return type and example
|
||||
[Back to methods index](index.md)
|
||||
|
||||
|
||||
**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)**
|
||||
### Parameters:
|
||||
|
||||
| Name | Type | Required |
|
||||
|----------|---------------|----------|
|
||||
|channel|[InputChannel](../types/InputChannel.md) | Optional|
|
||||
|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes|
|
||||
|offset|[int](../types/int.md) | Yes|
|
||||
|limit|[int](../types/int.md) | Yes|
|
||||
|
||||
|
||||
### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md)
|
||||
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||
|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|
||||
|Timeout|A timeout occurred while fetching data from the bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
```
|
||||
$MadelineProto = new \danog\MadelineProto\API();
|
||||
$MadelineProto->session = 'mySession.madeline';
|
||||
if (isset($token)) { // Login as a bot
|
||||
$MadelineProto->bot_login($token);
|
||||
}
|
||||
if (isset($number)) { // Login as a user
|
||||
$MadelineProto->phone_login($number);
|
||||
$code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API
|
||||
$MadelineProto->complete_phone_login($code);
|
||||
}
|
||||
|
||||
$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]);
|
||||
```
|
||||
|
||||
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
|
||||
|
||||
### As a bot:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
|
||||
|
||||
Parameters:
|
||||
|
||||
* method - channels.getParticipants
|
||||
* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }`
|
||||
|
||||
|
||||
|
||||
### As a user:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants`
|
||||
|
||||
Parameters:
|
||||
|
||||
channel - Json encoded InputChannel
|
||||
|
||||
filter - Json encoded ChannelParticipantsFilter
|
||||
|
||||
offset - Json encoded int
|
||||
|
||||
limit - Json encoded int
|
||||
|
||||
|
||||
|
||||
|
||||
Or, if you're into Lua:
|
||||
|
||||
```
|
||||
channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, })
|
||||
```
|
||||
|
||||
|
@ -6,8 +6,83 @@ description: channels.getParticipants parameters, return type and example
|
||||
[Back to methods index](index.md)
|
||||
|
||||
|
||||
**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)**
|
||||
### Parameters:
|
||||
|
||||
| Name | Type | Required |
|
||||
|----------|---------------|----------|
|
||||
|channel|[InputChannel](../types/InputChannel.md) | Optional|
|
||||
|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes|
|
||||
|offset|[int](../types/int.md) | Yes|
|
||||
|limit|[int](../types/int.md) | Yes|
|
||||
|
||||
|
||||
### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md)
|
||||
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||
|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|
||||
|Timeout|A timeout occurred while fetching data from the bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
```
|
||||
$MadelineProto = new \danog\MadelineProto\API();
|
||||
$MadelineProto->session = 'mySession.madeline';
|
||||
if (isset($token)) { // Login as a bot
|
||||
$MadelineProto->bot_login($token);
|
||||
}
|
||||
if (isset($number)) { // Login as a user
|
||||
$MadelineProto->phone_login($number);
|
||||
$code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API
|
||||
$MadelineProto->complete_phone_login($code);
|
||||
}
|
||||
|
||||
$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]);
|
||||
```
|
||||
|
||||
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
|
||||
|
||||
### As a bot:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
|
||||
|
||||
Parameters:
|
||||
|
||||
* method - channels.getParticipants
|
||||
* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }`
|
||||
|
||||
|
||||
|
||||
### As a user:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants`
|
||||
|
||||
Parameters:
|
||||
|
||||
channel - Json encoded InputChannel
|
||||
|
||||
filter - Json encoded ChannelParticipantsFilter
|
||||
|
||||
offset - Json encoded int
|
||||
|
||||
limit - Json encoded int
|
||||
|
||||
|
||||
|
||||
|
||||
Or, if you're into Lua:
|
||||
|
||||
```
|
||||
channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, })
|
||||
```
|
||||
|
||||
|
@ -6,8 +6,83 @@ description: channels.getParticipants parameters, return type and example
|
||||
[Back to methods index](index.md)
|
||||
|
||||
|
||||
**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)**
|
||||
### Parameters:
|
||||
|
||||
| Name | Type | Required |
|
||||
|----------|---------------|----------|
|
||||
|channel|[InputChannel](../types/InputChannel.md) | Optional|
|
||||
|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes|
|
||||
|offset|[int](../types/int.md) | Yes|
|
||||
|limit|[int](../types/int.md) | Yes|
|
||||
|
||||
|
||||
### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md)
|
||||
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||
|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|
||||
|Timeout|A timeout occurred while fetching data from the bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
```
|
||||
$MadelineProto = new \danog\MadelineProto\API();
|
||||
$MadelineProto->session = 'mySession.madeline';
|
||||
if (isset($token)) { // Login as a bot
|
||||
$MadelineProto->bot_login($token);
|
||||
}
|
||||
if (isset($number)) { // Login as a user
|
||||
$MadelineProto->phone_login($number);
|
||||
$code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API
|
||||
$MadelineProto->complete_phone_login($code);
|
||||
}
|
||||
|
||||
$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]);
|
||||
```
|
||||
|
||||
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
|
||||
|
||||
### As a bot:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
|
||||
|
||||
Parameters:
|
||||
|
||||
* method - channels.getParticipants
|
||||
* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }`
|
||||
|
||||
|
||||
|
||||
### As a user:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants`
|
||||
|
||||
Parameters:
|
||||
|
||||
channel - Json encoded InputChannel
|
||||
|
||||
filter - Json encoded ChannelParticipantsFilter
|
||||
|
||||
offset - Json encoded int
|
||||
|
||||
limit - Json encoded int
|
||||
|
||||
|
||||
|
||||
|
||||
Or, if you're into Lua:
|
||||
|
||||
```
|
||||
channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, })
|
||||
```
|
||||
|
||||
|
@ -6,8 +6,83 @@ description: channels.getParticipants parameters, return type and example
|
||||
[Back to methods index](index.md)
|
||||
|
||||
|
||||
**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)**
|
||||
### Parameters:
|
||||
|
||||
| Name | Type | Required |
|
||||
|----------|---------------|----------|
|
||||
|channel|[InputChannel](../types/InputChannel.md) | Optional|
|
||||
|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes|
|
||||
|offset|[int](../types/int.md) | Yes|
|
||||
|limit|[int](../types/int.md) | Yes|
|
||||
|
||||
|
||||
### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md)
|
||||
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||
|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|
||||
|Timeout|A timeout occurred while fetching data from the bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
```
|
||||
$MadelineProto = new \danog\MadelineProto\API();
|
||||
$MadelineProto->session = 'mySession.madeline';
|
||||
if (isset($token)) { // Login as a bot
|
||||
$MadelineProto->bot_login($token);
|
||||
}
|
||||
if (isset($number)) { // Login as a user
|
||||
$MadelineProto->phone_login($number);
|
||||
$code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API
|
||||
$MadelineProto->complete_phone_login($code);
|
||||
}
|
||||
|
||||
$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]);
|
||||
```
|
||||
|
||||
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
|
||||
|
||||
### As a bot:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
|
||||
|
||||
Parameters:
|
||||
|
||||
* method - channels.getParticipants
|
||||
* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }`
|
||||
|
||||
|
||||
|
||||
### As a user:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants`
|
||||
|
||||
Parameters:
|
||||
|
||||
channel - Json encoded InputChannel
|
||||
|
||||
filter - Json encoded ChannelParticipantsFilter
|
||||
|
||||
offset - Json encoded int
|
||||
|
||||
limit - Json encoded int
|
||||
|
||||
|
||||
|
||||
|
||||
Or, if you're into Lua:
|
||||
|
||||
```
|
||||
channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, })
|
||||
```
|
||||
|
||||
|
@ -6,8 +6,83 @@ description: channels.getParticipants parameters, return type and example
|
||||
[Back to methods index](index.md)
|
||||
|
||||
|
||||
**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)**
|
||||
### Parameters:
|
||||
|
||||
| Name | Type | Required |
|
||||
|----------|---------------|----------|
|
||||
|channel|[InputChannel](../types/InputChannel.md) | Optional|
|
||||
|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes|
|
||||
|offset|[int](../types/int.md) | Yes|
|
||||
|limit|[int](../types/int.md) | Yes|
|
||||
|
||||
|
||||
### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md)
|
||||
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||
|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|
||||
|Timeout|A timeout occurred while fetching data from the bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
```
|
||||
$MadelineProto = new \danog\MadelineProto\API();
|
||||
$MadelineProto->session = 'mySession.madeline';
|
||||
if (isset($token)) { // Login as a bot
|
||||
$MadelineProto->bot_login($token);
|
||||
}
|
||||
if (isset($number)) { // Login as a user
|
||||
$MadelineProto->phone_login($number);
|
||||
$code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API
|
||||
$MadelineProto->complete_phone_login($code);
|
||||
}
|
||||
|
||||
$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]);
|
||||
```
|
||||
|
||||
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
|
||||
|
||||
### As a bot:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
|
||||
|
||||
Parameters:
|
||||
|
||||
* method - channels.getParticipants
|
||||
* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }`
|
||||
|
||||
|
||||
|
||||
### As a user:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants`
|
||||
|
||||
Parameters:
|
||||
|
||||
channel - Json encoded InputChannel
|
||||
|
||||
filter - Json encoded ChannelParticipantsFilter
|
||||
|
||||
offset - Json encoded int
|
||||
|
||||
limit - Json encoded int
|
||||
|
||||
|
||||
|
||||
|
||||
Or, if you're into Lua:
|
||||
|
||||
```
|
||||
channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, })
|
||||
```
|
||||
|
||||
|
@ -6,8 +6,83 @@ description: channels.getParticipants parameters, return type and example
|
||||
[Back to methods index](index.md)
|
||||
|
||||
|
||||
**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)**
|
||||
### Parameters:
|
||||
|
||||
| Name | Type | Required |
|
||||
|----------|---------------|----------|
|
||||
|channel|[InputChannel](../types/InputChannel.md) | Optional|
|
||||
|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes|
|
||||
|offset|[int](../types/int.md) | Yes|
|
||||
|limit|[int](../types/int.md) | Yes|
|
||||
|
||||
|
||||
### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md)
|
||||
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||
|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|
||||
|Timeout|A timeout occurred while fetching data from the bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
```
|
||||
$MadelineProto = new \danog\MadelineProto\API();
|
||||
$MadelineProto->session = 'mySession.madeline';
|
||||
if (isset($token)) { // Login as a bot
|
||||
$MadelineProto->bot_login($token);
|
||||
}
|
||||
if (isset($number)) { // Login as a user
|
||||
$MadelineProto->phone_login($number);
|
||||
$code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API
|
||||
$MadelineProto->complete_phone_login($code);
|
||||
}
|
||||
|
||||
$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]);
|
||||
```
|
||||
|
||||
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
|
||||
|
||||
### As a bot:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
|
||||
|
||||
Parameters:
|
||||
|
||||
* method - channels.getParticipants
|
||||
* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }`
|
||||
|
||||
|
||||
|
||||
### As a user:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants`
|
||||
|
||||
Parameters:
|
||||
|
||||
channel - Json encoded InputChannel
|
||||
|
||||
filter - Json encoded ChannelParticipantsFilter
|
||||
|
||||
offset - Json encoded int
|
||||
|
||||
limit - Json encoded int
|
||||
|
||||
|
||||
|
||||
|
||||
Or, if you're into Lua:
|
||||
|
||||
```
|
||||
channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, })
|
||||
```
|
||||
|
||||
|
@ -6,8 +6,83 @@ description: channels.getParticipants parameters, return type and example
|
||||
[Back to methods index](index.md)
|
||||
|
||||
|
||||
**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)**
|
||||
### Parameters:
|
||||
|
||||
| Name | Type | Required |
|
||||
|----------|---------------|----------|
|
||||
|channel|[InputChannel](../types/InputChannel.md) | Optional|
|
||||
|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes|
|
||||
|offset|[int](../types/int.md) | Yes|
|
||||
|limit|[int](../types/int.md) | Yes|
|
||||
|
||||
|
||||
### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md)
|
||||
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||
|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|
||||
|Timeout|A timeout occurred while fetching data from the bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
```
|
||||
$MadelineProto = new \danog\MadelineProto\API();
|
||||
$MadelineProto->session = 'mySession.madeline';
|
||||
if (isset($token)) { // Login as a bot
|
||||
$MadelineProto->bot_login($token);
|
||||
}
|
||||
if (isset($number)) { // Login as a user
|
||||
$MadelineProto->phone_login($number);
|
||||
$code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API
|
||||
$MadelineProto->complete_phone_login($code);
|
||||
}
|
||||
|
||||
$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]);
|
||||
```
|
||||
|
||||
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
|
||||
|
||||
### As a bot:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
|
||||
|
||||
Parameters:
|
||||
|
||||
* method - channels.getParticipants
|
||||
* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }`
|
||||
|
||||
|
||||
|
||||
### As a user:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants`
|
||||
|
||||
Parameters:
|
||||
|
||||
channel - Json encoded InputChannel
|
||||
|
||||
filter - Json encoded ChannelParticipantsFilter
|
||||
|
||||
offset - Json encoded int
|
||||
|
||||
limit - Json encoded int
|
||||
|
||||
|
||||
|
||||
|
||||
Or, if you're into Lua:
|
||||
|
||||
```
|
||||
channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, })
|
||||
```
|
||||
|
||||
|
@ -6,8 +6,83 @@ description: channels.getParticipants parameters, return type and example
|
||||
[Back to methods index](index.md)
|
||||
|
||||
|
||||
**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)**
|
||||
### Parameters:
|
||||
|
||||
| Name | Type | Required |
|
||||
|----------|---------------|----------|
|
||||
|channel|[InputChannel](../types/InputChannel.md) | Optional|
|
||||
|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes|
|
||||
|offset|[int](../types/int.md) | Yes|
|
||||
|limit|[int](../types/int.md) | Yes|
|
||||
|
||||
|
||||
### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md)
|
||||
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||
|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|
||||
|Timeout|A timeout occurred while fetching data from the bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
```
|
||||
$MadelineProto = new \danog\MadelineProto\API();
|
||||
$MadelineProto->session = 'mySession.madeline';
|
||||
if (isset($token)) { // Login as a bot
|
||||
$MadelineProto->bot_login($token);
|
||||
}
|
||||
if (isset($number)) { // Login as a user
|
||||
$MadelineProto->phone_login($number);
|
||||
$code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API
|
||||
$MadelineProto->complete_phone_login($code);
|
||||
}
|
||||
|
||||
$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]);
|
||||
```
|
||||
|
||||
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
|
||||
|
||||
### As a bot:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
|
||||
|
||||
Parameters:
|
||||
|
||||
* method - channels.getParticipants
|
||||
* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }`
|
||||
|
||||
|
||||
|
||||
### As a user:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants`
|
||||
|
||||
Parameters:
|
||||
|
||||
channel - Json encoded InputChannel
|
||||
|
||||
filter - Json encoded ChannelParticipantsFilter
|
||||
|
||||
offset - Json encoded int
|
||||
|
||||
limit - Json encoded int
|
||||
|
||||
|
||||
|
||||
|
||||
Or, if you're into Lua:
|
||||
|
||||
```
|
||||
channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, })
|
||||
```
|
||||
|
||||
|
@ -6,8 +6,83 @@ description: channels.getParticipants parameters, return type and example
|
||||
[Back to methods index](index.md)
|
||||
|
||||
|
||||
**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)**
|
||||
### Parameters:
|
||||
|
||||
| Name | Type | Required |
|
||||
|----------|---------------|----------|
|
||||
|channel|[InputChannel](../types/InputChannel.md) | Optional|
|
||||
|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes|
|
||||
|offset|[int](../types/int.md) | Yes|
|
||||
|limit|[int](../types/int.md) | Yes|
|
||||
|
||||
|
||||
### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md)
|
||||
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||
|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|
||||
|Timeout|A timeout occurred while fetching data from the bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
```
|
||||
$MadelineProto = new \danog\MadelineProto\API();
|
||||
$MadelineProto->session = 'mySession.madeline';
|
||||
if (isset($token)) { // Login as a bot
|
||||
$MadelineProto->bot_login($token);
|
||||
}
|
||||
if (isset($number)) { // Login as a user
|
||||
$MadelineProto->phone_login($number);
|
||||
$code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API
|
||||
$MadelineProto->complete_phone_login($code);
|
||||
}
|
||||
|
||||
$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]);
|
||||
```
|
||||
|
||||
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
|
||||
|
||||
### As a bot:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
|
||||
|
||||
Parameters:
|
||||
|
||||
* method - channels.getParticipants
|
||||
* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }`
|
||||
|
||||
|
||||
|
||||
### As a user:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants`
|
||||
|
||||
Parameters:
|
||||
|
||||
channel - Json encoded InputChannel
|
||||
|
||||
filter - Json encoded ChannelParticipantsFilter
|
||||
|
||||
offset - Json encoded int
|
||||
|
||||
limit - Json encoded int
|
||||
|
||||
|
||||
|
||||
|
||||
Or, if you're into Lua:
|
||||
|
||||
```
|
||||
channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, })
|
||||
```
|
||||
|
||||
|
@ -6,8 +6,83 @@ description: channels.getParticipants parameters, return type and example
|
||||
[Back to methods index](index.md)
|
||||
|
||||
|
||||
**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)**
|
||||
### Parameters:
|
||||
|
||||
| Name | Type | Required |
|
||||
|----------|---------------|----------|
|
||||
|channel|[InputChannel](../types/InputChannel.md) | Optional|
|
||||
|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes|
|
||||
|offset|[int](../types/int.md) | Yes|
|
||||
|limit|[int](../types/int.md) | Yes|
|
||||
|
||||
|
||||
### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md)
|
||||
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||
|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|
||||
|Timeout|A timeout occurred while fetching data from the bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
```
|
||||
$MadelineProto = new \danog\MadelineProto\API();
|
||||
$MadelineProto->session = 'mySession.madeline';
|
||||
if (isset($token)) { // Login as a bot
|
||||
$MadelineProto->bot_login($token);
|
||||
}
|
||||
if (isset($number)) { // Login as a user
|
||||
$MadelineProto->phone_login($number);
|
||||
$code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API
|
||||
$MadelineProto->complete_phone_login($code);
|
||||
}
|
||||
|
||||
$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]);
|
||||
```
|
||||
|
||||
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
|
||||
|
||||
### As a bot:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
|
||||
|
||||
Parameters:
|
||||
|
||||
* method - channels.getParticipants
|
||||
* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }`
|
||||
|
||||
|
||||
|
||||
### As a user:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants`
|
||||
|
||||
Parameters:
|
||||
|
||||
channel - Json encoded InputChannel
|
||||
|
||||
filter - Json encoded ChannelParticipantsFilter
|
||||
|
||||
offset - Json encoded int
|
||||
|
||||
limit - Json encoded int
|
||||
|
||||
|
||||
|
||||
|
||||
Or, if you're into Lua:
|
||||
|
||||
```
|
||||
channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, })
|
||||
```
|
||||
|
||||
|
@ -6,8 +6,83 @@ description: channels.getParticipants parameters, return type and example
|
||||
[Back to methods index](index.md)
|
||||
|
||||
|
||||
**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)**
|
||||
### Parameters:
|
||||
|
||||
| Name | Type | Required |
|
||||
|----------|---------------|----------|
|
||||
|channel|[InputChannel](../types/InputChannel.md) | Optional|
|
||||
|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes|
|
||||
|offset|[int](../types/int.md) | Yes|
|
||||
|limit|[int](../types/int.md) | Yes|
|
||||
|
||||
|
||||
### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md)
|
||||
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||
|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|
||||
|Timeout|A timeout occurred while fetching data from the bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
```
|
||||
$MadelineProto = new \danog\MadelineProto\API();
|
||||
$MadelineProto->session = 'mySession.madeline';
|
||||
if (isset($token)) { // Login as a bot
|
||||
$MadelineProto->bot_login($token);
|
||||
}
|
||||
if (isset($number)) { // Login as a user
|
||||
$MadelineProto->phone_login($number);
|
||||
$code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API
|
||||
$MadelineProto->complete_phone_login($code);
|
||||
}
|
||||
|
||||
$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]);
|
||||
```
|
||||
|
||||
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
|
||||
|
||||
### As a bot:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
|
||||
|
||||
Parameters:
|
||||
|
||||
* method - channels.getParticipants
|
||||
* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }`
|
||||
|
||||
|
||||
|
||||
### As a user:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants`
|
||||
|
||||
Parameters:
|
||||
|
||||
channel - Json encoded InputChannel
|
||||
|
||||
filter - Json encoded ChannelParticipantsFilter
|
||||
|
||||
offset - Json encoded int
|
||||
|
||||
limit - Json encoded int
|
||||
|
||||
|
||||
|
||||
|
||||
Or, if you're into Lua:
|
||||
|
||||
```
|
||||
channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, })
|
||||
```
|
||||
|
||||
|
@ -6,8 +6,83 @@ description: channels.getParticipants parameters, return type and example
|
||||
[Back to methods index](index.md)
|
||||
|
||||
|
||||
**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)**
|
||||
### Parameters:
|
||||
|
||||
| Name | Type | Required |
|
||||
|----------|---------------|----------|
|
||||
|channel|[InputChannel](../types/InputChannel.md) | Optional|
|
||||
|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes|
|
||||
|offset|[int](../types/int.md) | Yes|
|
||||
|limit|[int](../types/int.md) | Yes|
|
||||
|
||||
|
||||
### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md)
|
||||
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||
|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|
||||
|Timeout|A timeout occurred while fetching data from the bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
```
|
||||
$MadelineProto = new \danog\MadelineProto\API();
|
||||
$MadelineProto->session = 'mySession.madeline';
|
||||
if (isset($token)) { // Login as a bot
|
||||
$MadelineProto->bot_login($token);
|
||||
}
|
||||
if (isset($number)) { // Login as a user
|
||||
$MadelineProto->phone_login($number);
|
||||
$code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API
|
||||
$MadelineProto->complete_phone_login($code);
|
||||
}
|
||||
|
||||
$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]);
|
||||
```
|
||||
|
||||
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
|
||||
|
||||
### As a bot:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
|
||||
|
||||
Parameters:
|
||||
|
||||
* method - channels.getParticipants
|
||||
* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }`
|
||||
|
||||
|
||||
|
||||
### As a user:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants`
|
||||
|
||||
Parameters:
|
||||
|
||||
channel - Json encoded InputChannel
|
||||
|
||||
filter - Json encoded ChannelParticipantsFilter
|
||||
|
||||
offset - Json encoded int
|
||||
|
||||
limit - Json encoded int
|
||||
|
||||
|
||||
|
||||
|
||||
Or, if you're into Lua:
|
||||
|
||||
```
|
||||
channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, })
|
||||
```
|
||||
|
||||
|
@ -6,8 +6,83 @@ description: channels.getParticipants parameters, return type and example
|
||||
[Back to methods index](index.md)
|
||||
|
||||
|
||||
**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)**
|
||||
### Parameters:
|
||||
|
||||
| Name | Type | Required |
|
||||
|----------|---------------|----------|
|
||||
|channel|[InputChannel](../types/InputChannel.md) | Optional|
|
||||
|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes|
|
||||
|offset|[int](../types/int.md) | Yes|
|
||||
|limit|[int](../types/int.md) | Yes|
|
||||
|
||||
|
||||
### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md)
|
||||
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||
|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|
||||
|Timeout|A timeout occurred while fetching data from the bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
```
|
||||
$MadelineProto = new \danog\MadelineProto\API();
|
||||
$MadelineProto->session = 'mySession.madeline';
|
||||
if (isset($token)) { // Login as a bot
|
||||
$MadelineProto->bot_login($token);
|
||||
}
|
||||
if (isset($number)) { // Login as a user
|
||||
$MadelineProto->phone_login($number);
|
||||
$code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API
|
||||
$MadelineProto->complete_phone_login($code);
|
||||
}
|
||||
|
||||
$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]);
|
||||
```
|
||||
|
||||
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
|
||||
|
||||
### As a bot:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
|
||||
|
||||
Parameters:
|
||||
|
||||
* method - channels.getParticipants
|
||||
* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }`
|
||||
|
||||
|
||||
|
||||
### As a user:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants`
|
||||
|
||||
Parameters:
|
||||
|
||||
channel - Json encoded InputChannel
|
||||
|
||||
filter - Json encoded ChannelParticipantsFilter
|
||||
|
||||
offset - Json encoded int
|
||||
|
||||
limit - Json encoded int
|
||||
|
||||
|
||||
|
||||
|
||||
Or, if you're into Lua:
|
||||
|
||||
```
|
||||
channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, })
|
||||
```
|
||||
|
||||
|
@ -6,8 +6,86 @@ description: channels.getParticipants parameters, return type and example
|
||||
[Back to methods index](index.md)
|
||||
|
||||
|
||||
**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)**
|
||||
### Parameters:
|
||||
|
||||
| Name | Type | Required |
|
||||
|----------|---------------|----------|
|
||||
|channel|[InputChannel](../types/InputChannel.md) | Optional|
|
||||
|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes|
|
||||
|offset|[int](../types/int.md) | Yes|
|
||||
|limit|[int](../types/int.md) | Yes|
|
||||
|hash|[int](../types/int.md) | Yes|
|
||||
|
||||
|
||||
### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md)
|
||||
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||
|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|
||||
|Timeout|A timeout occurred while fetching data from the bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
```
|
||||
$MadelineProto = new \danog\MadelineProto\API();
|
||||
$MadelineProto->session = 'mySession.madeline';
|
||||
if (isset($token)) { // Login as a bot
|
||||
$MadelineProto->bot_login($token);
|
||||
}
|
||||
if (isset($number)) { // Login as a user
|
||||
$MadelineProto->phone_login($number);
|
||||
$code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API
|
||||
$MadelineProto->complete_phone_login($code);
|
||||
}
|
||||
|
||||
$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, 'hash' => int, ]);
|
||||
```
|
||||
|
||||
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
|
||||
|
||||
### As a bot:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
|
||||
|
||||
Parameters:
|
||||
|
||||
* method - channels.getParticipants
|
||||
* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, "hash": int, }`
|
||||
|
||||
|
||||
|
||||
### As a user:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants`
|
||||
|
||||
Parameters:
|
||||
|
||||
channel - Json encoded InputChannel
|
||||
|
||||
filter - Json encoded ChannelParticipantsFilter
|
||||
|
||||
offset - Json encoded int
|
||||
|
||||
limit - Json encoded int
|
||||
|
||||
hash - Json encoded int
|
||||
|
||||
|
||||
|
||||
|
||||
Or, if you're into Lua:
|
||||
|
||||
```
|
||||
channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, hash=int, })
|
||||
```
|
||||
|
||||
|
@ -6,8 +6,86 @@ description: channels.getParticipants parameters, return type and example
|
||||
[Back to methods index](index.md)
|
||||
|
||||
|
||||
**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)**
|
||||
### Parameters:
|
||||
|
||||
| Name | Type | Required |
|
||||
|----------|---------------|----------|
|
||||
|channel|[InputChannel](../types/InputChannel.md) | Optional|
|
||||
|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes|
|
||||
|offset|[int](../types/int.md) | Yes|
|
||||
|limit|[int](../types/int.md) | Yes|
|
||||
|hash|[int](../types/int.md) | Yes|
|
||||
|
||||
|
||||
### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md)
|
||||
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||
|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|
||||
|Timeout|A timeout occurred while fetching data from the bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
```
|
||||
$MadelineProto = new \danog\MadelineProto\API();
|
||||
$MadelineProto->session = 'mySession.madeline';
|
||||
if (isset($token)) { // Login as a bot
|
||||
$MadelineProto->bot_login($token);
|
||||
}
|
||||
if (isset($number)) { // Login as a user
|
||||
$MadelineProto->phone_login($number);
|
||||
$code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API
|
||||
$MadelineProto->complete_phone_login($code);
|
||||
}
|
||||
|
||||
$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, 'hash' => int, ]);
|
||||
```
|
||||
|
||||
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
|
||||
|
||||
### As a bot:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
|
||||
|
||||
Parameters:
|
||||
|
||||
* method - channels.getParticipants
|
||||
* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, "hash": int, }`
|
||||
|
||||
|
||||
|
||||
### As a user:
|
||||
|
||||
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants`
|
||||
|
||||
Parameters:
|
||||
|
||||
channel - Json encoded InputChannel
|
||||
|
||||
filter - Json encoded ChannelParticipantsFilter
|
||||
|
||||
offset - Json encoded int
|
||||
|
||||
limit - Json encoded int
|
||||
|
||||
hash - Json encoded int
|
||||
|
||||
|
||||
|
||||
|
||||
Or, if you're into Lua:
|
||||
|
||||
```
|
||||
channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, hash=int, })
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user