getChatMember method
Use this method to get information about a member of a chat
Returns a ChatMember object on success.
Implementation
Future<ChatMember> getChatMember(dynamic chatId, int userId) async {
if (chatId is! String && chatId is! int) {
return Future.error(TelegramException(
'Attribute \'chatId\' can only be either type of String or int'));
}
var requestUrl = _apiUri('getChatMember');
var body = <String, dynamic>{
'chat_id': chatId,
'user_id': userId,
};
return ChatMember.fromJson(
await HttpClient.httpPost(requestUrl, body: body));
}