Skip to content

Commit

Permalink
Merge pull request #102 from erictik/fix-finished
Browse files Browse the repository at this point in the history
fix-finished
  • Loading branch information
zcpua authored Jun 11, 2023
2 parents 6bdc45d + b6eee3c commit 07ff704
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion example/imagine-ws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function main() {
});
await client.init();
const msg = await client.Imagine(
"A little white dog",
"the queen of the underworld, race: vampire, appearance: delicate features with detailed portrayal, super exquisite facial features, silver long hair reaching ankles, silver pupils, fair skin with a hint of melancholy in the eyes, beautiful and noble, clothing: wearing a blood-red rose on the hair, skirt with layers of lace, sitting in a (pose), captured in ultra-high resolution, film-like realism, 8k for the best visual quality, super clear and finely drawn. --ar 9:16 --v 5",
(uri: string, progress: string) => {
console.log("loading", uri, "progress", progress);
}
Expand Down
8 changes: 4 additions & 4 deletions src/ws.message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export class WsMessage {
}
private async messageCreate(message: any) {
// this.log("messageCreate", message);
const { application_id, embeds, id, nonce } = message;
const { embeds, id, nonce, components } = message;
if (nonce) {
this.log("waiting start image or info or error");
this.updateMjEventIdByNonce(id, nonce);
Expand Down Expand Up @@ -117,9 +117,9 @@ export class WsMessage {
}
}
}
//done image
if (!nonce && !application_id) {
this.log("done image");
//finished image
if (!nonce && components.length > 0) {
this.log("finished image");
this.done(message);
return;
}
Expand Down

0 comments on commit 07ff704

Please sign in to comment.