diff --git a/README.md b/README.md index 664e3ff8..04831280 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docs/API_docs/methods/channels_getParticipants.md b/docs/API_docs/methods/channels_getParticipants.md index d84cf09c..2af62d64 100644 --- a/docs/API_docs/methods/channels_getParticipants.md +++ b/docs/API_docs/methods/channels_getParticipants.md @@ -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, }) +``` + diff --git a/docs/index.md b/docs/index.md index 664e3ff8..1017c509 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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 diff --git a/old_docs/API_docs_v38/methods/channels_getParticipants.md b/old_docs/API_docs_v38/methods/channels_getParticipants.md index d84cf09c..5d1bd833 100644 --- a/old_docs/API_docs_v38/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v38/methods/channels_getParticipants.md @@ -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, }) +``` + diff --git a/old_docs/API_docs_v41/methods/channels_getParticipants.md b/old_docs/API_docs_v41/methods/channels_getParticipants.md index d84cf09c..5d1bd833 100644 --- a/old_docs/API_docs_v41/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v41/methods/channels_getParticipants.md @@ -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, }) +``` + diff --git a/old_docs/API_docs_v42/methods/channels_getParticipants.md b/old_docs/API_docs_v42/methods/channels_getParticipants.md index d84cf09c..5d1bd833 100644 --- a/old_docs/API_docs_v42/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v42/methods/channels_getParticipants.md @@ -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, }) +``` + diff --git a/old_docs/API_docs_v44/methods/channels_getParticipants.md b/old_docs/API_docs_v44/methods/channels_getParticipants.md index d84cf09c..5d1bd833 100644 --- a/old_docs/API_docs_v44/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v44/methods/channels_getParticipants.md @@ -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, }) +``` + diff --git a/old_docs/API_docs_v45/methods/channels_getParticipants.md b/old_docs/API_docs_v45/methods/channels_getParticipants.md index d84cf09c..5d1bd833 100644 --- a/old_docs/API_docs_v45/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v45/methods/channels_getParticipants.md @@ -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, }) +``` + diff --git a/old_docs/API_docs_v46/methods/channels_getParticipants.md b/old_docs/API_docs_v46/methods/channels_getParticipants.md index d84cf09c..5d1bd833 100644 --- a/old_docs/API_docs_v46/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v46/methods/channels_getParticipants.md @@ -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, }) +``` + diff --git a/old_docs/API_docs_v51/methods/channels_getParticipants.md b/old_docs/API_docs_v51/methods/channels_getParticipants.md index d84cf09c..5d1bd833 100644 --- a/old_docs/API_docs_v51/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v51/methods/channels_getParticipants.md @@ -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, }) +``` + diff --git a/old_docs/API_docs_v53/methods/channels_getParticipants.md b/old_docs/API_docs_v53/methods/channels_getParticipants.md index d84cf09c..5d1bd833 100644 --- a/old_docs/API_docs_v53/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v53/methods/channels_getParticipants.md @@ -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, }) +``` + diff --git a/old_docs/API_docs_v55/methods/channels_getParticipants.md b/old_docs/API_docs_v55/methods/channels_getParticipants.md index d84cf09c..5d1bd833 100644 --- a/old_docs/API_docs_v55/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v55/methods/channels_getParticipants.md @@ -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, }) +``` + diff --git a/old_docs/API_docs_v57/methods/channels_getParticipants.md b/old_docs/API_docs_v57/methods/channels_getParticipants.md index d84cf09c..5d1bd833 100644 --- a/old_docs/API_docs_v57/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v57/methods/channels_getParticipants.md @@ -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, }) +``` + diff --git a/old_docs/API_docs_v62/methods/channels_getParticipants.md b/old_docs/API_docs_v62/methods/channels_getParticipants.md index d84cf09c..5d1bd833 100644 --- a/old_docs/API_docs_v62/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v62/methods/channels_getParticipants.md @@ -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, }) +``` + diff --git a/old_docs/API_docs_v65/methods/channels_getParticipants.md b/old_docs/API_docs_v65/methods/channels_getParticipants.md index d84cf09c..5d1bd833 100644 --- a/old_docs/API_docs_v65/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v65/methods/channels_getParticipants.md @@ -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, }) +``` + diff --git a/old_docs/API_docs_v66/methods/channels_getParticipants.md b/old_docs/API_docs_v66/methods/channels_getParticipants.md index d84cf09c..5d1bd833 100644 --- a/old_docs/API_docs_v66/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v66/methods/channels_getParticipants.md @@ -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, }) +``` + diff --git a/old_docs/API_docs_v68/methods/channels_getParticipants.md b/old_docs/API_docs_v68/methods/channels_getParticipants.md index d84cf09c..5d1bd833 100644 --- a/old_docs/API_docs_v68/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v68/methods/channels_getParticipants.md @@ -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, }) +``` + diff --git a/old_docs/API_docs_v70/methods/channels_getParticipants.md b/old_docs/API_docs_v70/methods/channels_getParticipants.md index d84cf09c..5d1bd833 100644 --- a/old_docs/API_docs_v70/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v70/methods/channels_getParticipants.md @@ -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, }) +``` + diff --git a/old_docs/API_docs_v71/methods/channels_getParticipants.md b/old_docs/API_docs_v71/methods/channels_getParticipants.md index d84cf09c..5d1bd833 100644 --- a/old_docs/API_docs_v71/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v71/methods/channels_getParticipants.md @@ -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, }) +``` + diff --git a/old_docs/API_docs_v72/methods/channels_getParticipants.md b/old_docs/API_docs_v72/methods/channels_getParticipants.md index d84cf09c..2af62d64 100644 --- a/old_docs/API_docs_v72/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v72/methods/channels_getParticipants.md @@ -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, }) +``` + diff --git a/old_docs/API_docs_v73/methods/channels_getParticipants.md b/old_docs/API_docs_v73/methods/channels_getParticipants.md index d84cf09c..2af62d64 100644 --- a/old_docs/API_docs_v73/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v73/methods/channels_getParticipants.md @@ -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, }) +``` +