Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric committed Jun 18, 2023
1 parent 114b79a commit faaa18e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/ws.message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class WsMessage {
return new Promise((resolve) => setTimeout(resolve, ms));
}
private async messageCreate(message: any) {
const { embeds, id, nonce, components } = message;
const { embeds, id, nonce, components, attachments } = message;

if (nonce) {
this.log("waiting start image or info or error");
Expand Down Expand Up @@ -128,8 +128,7 @@ export class WsMessage {
}
}

if (!nonce && components?.length > 0) {
this.log("finished image");
if (!nonce && attachments?.length > 0 && components?.length > 0) {
this.done(message);
return;
}
Expand Down Expand Up @@ -240,7 +239,6 @@ export class WsMessage {

private done(message: any) {
const { content, id, attachments, components, flags } = message;
console.log("components=====", JSON.stringify(components));
const MJmsg: MJMessage = {
id,
flags,
Expand Down

0 comments on commit faaa18e

Please sign in to comment.