foxwells.vinboard: more attachment fixes
This commit is contained in:
		
							parent
							
								
									0a2e30a41f
								
							
						
					
					
						commit
						1ed011d9c0
					
				
					 1 changed files with 15 additions and 15 deletions
				
			
		| 
						 | 
					@ -191,8 +191,7 @@ async function findSuitableImage(msg) {
 | 
				
			||||||
        .then((res) => res.arrayBuffer())
 | 
					        .then((res) => res.arrayBuffer())
 | 
				
			||||||
        .then((buf) => Buffer.from(buf));
 | 
					        .then((buf) => Buffer.from(buf));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  } else {
 | 
				
			||||||
 | 
					 | 
				
			||||||
    for (const embed of msg.embeds) {
 | 
					    for (const embed of msg.embeds) {
 | 
				
			||||||
      if (!embed.url) continue;
 | 
					      if (!embed.url) continue;
 | 
				
			||||||
      if (embed.image) {
 | 
					      if (embed.image) {
 | 
				
			||||||
| 
						 | 
					@ -207,6 +206,7 @@ async function findSuitableImage(msg) {
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return out;
 | 
					  return out;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -244,7 +244,7 @@ async function createBoardMessage(msg, count) {
 | 
				
			||||||
    threadID: VINBOARD_THREAD_ID,
 | 
					    threadID: VINBOARD_THREAD_ID,
 | 
				
			||||||
    threadName: "Vinboard",
 | 
					    threadName: "Vinboard",
 | 
				
			||||||
    embeds: [embed],
 | 
					    embeds: [embed],
 | 
				
			||||||
    attachments: image.file ? {file: image.file, filename: "thumb.jpg"} : null,
 | 
					    files: image.file ? [{file: image.file, filename: "thumb.jpg"}] : null,
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue