获取电报组成员数

get the count of telegram group members

我试试看

GetChatMemberCount chatMemberCount = new GetChatMemberCount().setChatId(message.getChatId()); 
Integer count = chatMemberCount.deserializeResponse("false");

但是有异常

'Cannot construct instance of org.telegram.telegrambots.api.objects.replykeyboard.ApiResponse (although at least one Creator exists): no boolean/Boolean-argument constructor/factory method to deserialize from boolean value (false)'.

通过这种方式,我得到了群成员的数量。

GetChatMemberCount chatMemberCount = new GetChatMemberCount().setChatId(message.getChatId());
try { Integer count = execute(chatMemberCount); } catch (TelegramApiException e) { logger.error(e.getMessage()); }