Skip to content

Commit

Permalink
feat: When the image is generated, return the width and height inform…
Browse files Browse the repository at this point in the history
…ation.
  • Loading branch information
MuYiBo committed Jul 29, 2023
1 parent 7786c3e commit 9285bf9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/discord.message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ export class MidjourneyMessage {
const msg: MJMessage = {
content,
id: item.id,
uri: uri,
proxy_url: proxy_url,
uri,
proxy_url,
flags: item.flags,
hash: this.UriToHash(uri),
progress: "done",
Expand Down
4 changes: 2 additions & 2 deletions src/discord.ws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ export class WsMessage {
private done(message: any) {
const { content, id, attachments, components, flags } = message;
const { url, proxy_url, width, height } = attachments[0];
let uri = attachments[0].url;
let uri = url;
if (this.config.ImageProxy !== "") {
uri = uri.replace("https://cdn.discordapp.com/", this.config.ImageProxy);
}
Expand All @@ -411,7 +411,7 @@ export class WsMessage {
content,
hash: uriToHash(url),
progress: "done",
uri: uri,
uri,
proxy_url,
options: formatOptions(components),
width,
Expand Down

0 comments on commit 9285bf9

Please sign in to comment.