setChatAdministratorCustomTitle method
Use this method to set a custom title for an administrator in a supergroup promoted by the bot
Returns True on success.
https://core.telegram.org/bots/api#setchatadministratorcustomtitle
Implementation
Future<bool> setChatAdministratorCustomTitle(
dynamic chatId, int userId, String customTitle) 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('setChatAdministratorCustomTitle');
var body = <String, dynamic>{
'chat_id': chatId,
'user_id': userId,
'custom_title': customTitle,
};
return await HttpClient.httpPost(requestUrl, body: body);
}