importBotAuthorization method

Future<Result<AuthAuthorizationBase>> importBotAuthorization({
  1. required int flags,
  2. required int apiId,
  3. required String apiHash,
  4. required String botAuthToken,
})

Import Bot Authorization.

ID: 67a3ff2c.

Implementation

Future<Result<AuthAuthorizationBase>> importBotAuthorization({
  required int flags,
  required int apiId,
  required String apiHash,
  required String botAuthToken,
}) async {
  // Preparing the request.
  final request = AuthImportBotAuthorization(
    flags: flags,
    apiId: apiId,
    apiHash: apiHash,
    botAuthToken: botAuthToken,
  );

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

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