telegram-bot-sdk icon indicating copy to clipboard operation
telegram-bot-sdk copied to clipboard

Get Channel Group Members

Open RVP04 opened this issue 2 years ago • 5 comments

PHP version

8.1.3

irazasyed/telegram-bot-sdk version

v3.13.0

Laravel version (if any)

v10.30.0

Code To Reproduce the bug

When I try to use the getChatMember or getChatMembers I get

Telegram\ Bot\ Exceptions \ TelegramResponseException

Bad Request: invalid user_id specified

I am trying with the code

$chatId = 'xxxx';
    return \Telegram\Bot\Laravel\Facades\Telegram::getChatMember(['chat_id' => $chatId]);

Error stacktrace (if any)

No response

RVP04 avatar Oct 31 '23 16:10 RVP04

In Telegram doc,user_id in the method is required getchatmember

$chatId = 'xxxx';
$userId = 123
return \Telegram\Bot\Laravel\Facades\Telegram::getChatMember(['chat_id' => $chatId, 'user_id' => $userId]);

HelplessMan avatar Nov 16 '23 10:11 HelplessMan

I want to all the members from the group not to check whether he is a member

RVP04 avatar Nov 16 '23 18:11 RVP04

I want to all the members from the group not to check whether he is a member

According to my understanding, telegram-bot-sdk cannot directly obtain all users of the group

HelplessMan avatar Nov 17 '23 06:11 HelplessMan

But, you can use this personal account based on the telegram MTProto protocol to achieve the functions you need getPwrChat

HelplessMan avatar Nov 17 '23 06:11 HelplessMan

I am working on laravel application but I don't whether package is available.

RVP04 avatar Nov 17 '23 06:11 RVP04

This is not possible with Bot API

irazasyed avatar Mar 11 '24 03:03 irazasyed