leaveChat method

Future<bool> leaveChat(
  1. ID chatId
)

Use this method for your bot to leave a group, supergroup or channel. Returns True on success.

See: https://core.telegram.org/bots/api#leavechat

Implementation

Future<bool> leaveChat(ID chatId) async {
  final params = <String, dynamic>{'chat_id': chatId};

  final payload = Payload(params);
  return await _makeRequest<bool>(APIMethod.leaveChat.name, payload);
}