utility.avatar: fixes for guild avatars
This commit is contained in:
		
							parent
							
								
									159870877b
								
							
						
					
					
						commit
						4dadf820af
					
				
					 1 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
					@ -98,8 +98,9 @@ avatar.callback = async function (msg, line) {
 | 
				
			||||||
    ) {
 | 
					    ) {
 | 
				
			||||||
      return user;
 | 
					      return user;
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      const url = `${AVATAR_BASE}${user.id}/${user.avatar}.${
 | 
					      const avatar = user.avatar || user.user.avatar;
 | 
				
			||||||
        user.avatar.startsWith("a_") ? "gif?size=1024&_=.gif" : "png?size=1024"
 | 
					      const url = `${AVATAR_BASE}${user.id}/${avatar}.${
 | 
				
			||||||
 | 
					        avatar.startsWith("a_") ? "gif?size=1024&_=.gif" : "png?size=1024"
 | 
				
			||||||
      }`;
 | 
					      }`;
 | 
				
			||||||
      return {
 | 
					      return {
 | 
				
			||||||
        embed: {
 | 
					        embed: {
 | 
				
			||||||
| 
						 | 
					@ -112,10 +113,9 @@ avatar.callback = async function (msg, line) {
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    const url = `${AVATAR_BASE}${msg.author.id}/${msg.author.avatar}.${
 | 
					    const avatar = msg.member.avatar || msg.author.avatar;
 | 
				
			||||||
      msg.author.avatar.startsWith("a_")
 | 
					    const url = `${AVATAR_BASE}${msg.author.id}/${avatar}.${
 | 
				
			||||||
        ? "gif?size=1024&_=.gif"
 | 
					      avatar.startsWith("a_") ? "gif?size=1024&_=.gif" : "png?size=1024"
 | 
				
			||||||
        : "png?size=1024"
 | 
					 | 
				
			||||||
    }`;
 | 
					    }`;
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      embed: {
 | 
					      embed: {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue