midjourney_client 0.4.1-pre.3 midjourney_client: ^0.4.1-pre.3 copied to clipboard
Unofficial midjourney client that gives you possibility to generates images! Now, it utilizes the Discord API to communicate with the bot.
// ignore_for_file: avoid_print
import 'dart:async';
import 'dart:io';
import 'package:midjourney_client/midjourney_client.dart' as midjourney_client;
import 'env.dart';
Future<void> main(List<Object> arguments) async {
final client = midjourney_client.Midjourney();
await client.initialize(
channelId: Env.channelId,
serverId: Env.serverId,
token: Env.token,
logLevel: midjourney_client.MLoggerLevel.verbose,
);
final imagine = client.imagine('Red rose').asBroadcastStream()
..listen(print);
final imagineResult = await imagine.finished;
final upscaled = client.upscale(imagineResult, 1).asBroadcastStream()
..listen(print);
final upscaleResult = await upscaled.finished;
print(upscaleResult);
exit(0);
}