userinfo: where nameplate image
This commit is contained in:
		
							parent
							
								
									96fd672ec8
								
							
						
					
					
						commit
						c515f1d401
					
				
					 1 changed files with 5 additions and 5 deletions
				
			
		| 
						 | 
					@ -500,7 +500,7 @@ userinfo.callback = async function (msg, line) {
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  let nameplateEmbed;
 | 
					  let nameplateEmbed;
 | 
				
			||||||
  const files = [];
 | 
					  const attachments = [];
 | 
				
			||||||
  if (user.collectibles?.nameplate) {
 | 
					  if (user.collectibles?.nameplate) {
 | 
				
			||||||
    const {nameplate} = user.collectibles;
 | 
					    const {nameplate} = user.collectibles;
 | 
				
			||||||
    const palette = NameplatePalettes[nameplate.palette];
 | 
					    const palette = NameplatePalettes[nameplate.palette];
 | 
				
			||||||
| 
						 | 
					@ -526,9 +526,9 @@ userinfo.callback = async function (msg, line) {
 | 
				
			||||||
          {input: await bg_light.toBuffer(), gravity: "north"},
 | 
					          {input: await bg_light.toBuffer(), gravity: "north"},
 | 
				
			||||||
          {input: await bg_dark.toBuffer(), gravity: "south"},
 | 
					          {input: await bg_dark.toBuffer(), gravity: "south"},
 | 
				
			||||||
        ]);
 | 
					        ]);
 | 
				
			||||||
        files.push({
 | 
					        attachments.push({
 | 
				
			||||||
          contents: await final.png().toBuffer(),
 | 
					          file: await final.png().toBuffer(),
 | 
				
			||||||
          name: "nameplate.png",
 | 
					          filename: "nameplate.png",
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
        imageUrl = "attachment://nameplate.png";
 | 
					        imageUrl = "attachment://nameplate.png";
 | 
				
			||||||
      } catch {
 | 
					      } catch {
 | 
				
			||||||
| 
						 | 
					@ -557,7 +557,7 @@ userinfo.callback = async function (msg, line) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return {
 | 
					  return {
 | 
				
			||||||
    embeds: [embed, nameplateEmbed].filter((x) => !!x),
 | 
					    embeds: [embed, nameplateEmbed].filter((x) => !!x),
 | 
				
			||||||
    files,
 | 
					    attachments,
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
hf.registerCommand(userinfo);
 | 
					hf.registerCommand(userinfo);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue