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;
 | 
			
		||||
  const files = [];
 | 
			
		||||
  const attachments = [];
 | 
			
		||||
  if (user.collectibles?.nameplate) {
 | 
			
		||||
    const {nameplate} = user.collectibles;
 | 
			
		||||
    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_dark.toBuffer(), gravity: "south"},
 | 
			
		||||
        ]);
 | 
			
		||||
        files.push({
 | 
			
		||||
          contents: await final.png().toBuffer(),
 | 
			
		||||
          name: "nameplate.png",
 | 
			
		||||
        attachments.push({
 | 
			
		||||
          file: await final.png().toBuffer(),
 | 
			
		||||
          filename: "nameplate.png",
 | 
			
		||||
        });
 | 
			
		||||
        imageUrl = "attachment://nameplate.png";
 | 
			
		||||
      } catch {
 | 
			
		||||
| 
						 | 
				
			
			@ -557,7 +557,7 @@ userinfo.callback = async function (msg, line) {
 | 
			
		|||
 | 
			
		||||
  return {
 | 
			
		||||
    embeds: [embed, nameplateEmbed].filter((x) => !!x),
 | 
			
		||||
    files,
 | 
			
		||||
    attachments,
 | 
			
		||||
  };
 | 
			
		||||
};
 | 
			
		||||
hf.registerCommand(userinfo);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue