exportChatInvite method

Future<Result<ExportedChatInviteBase>> exportChatInvite({
  1. required bool legacyRevokePermanent,
  2. required bool requestNeeded,
  3. required InputPeerBase peer,
  4. DateTime? expireDate,
  5. int? usageLimit,
  6. String? title,
})

Export Chat Invite.

ID: a02ce5d5.

Implementation

Future<Result<ExportedChatInviteBase>> exportChatInvite({
  required bool legacyRevokePermanent,
  required bool requestNeeded,
  required InputPeerBase peer,
  DateTime? expireDate,
  int? usageLimit,
  String? title,
}) async {
  // Preparing the request.
  final request = MessagesExportChatInvite(
    legacyRevokePermanent: legacyRevokePermanent,
    requestNeeded: requestNeeded,
    peer: peer,
    expireDate: expireDate,
    usageLimit: usageLimit,
    title: title,
  );

  // Invoke and wait for response.
  final response = await _c.invoke(request);

  // Return the result.
  return response._to<ExportedChatInviteBase>();
}