use User#displayAvatarURL and dont encode reason
This commit is contained in:
parent
b4ba1daa76
commit
f9e1343003
9 changed files with 9 additions and 12 deletions
|
@ -16,7 +16,7 @@ export const AvatarCmd = utilityCmd({
|
|||
async run({ message: msg, args, pluginData }) {
|
||||
const user = args.user || msg.author;
|
||||
if (!(user instanceof UnknownUser)) {
|
||||
const avatar = user.avatarURL() || user.defaultAvatarURL;
|
||||
const avatar = user.displayAvatarURL();
|
||||
let extension = avatar.slice(avatar.lastIndexOf("."), avatar.lastIndexOf("?"));
|
||||
// Some pngs can have the .jpg extention for some reason, so we always use .png for static images
|
||||
extension = extension === ".gif" ? extension : ".png";
|
||||
|
|
|
@ -39,7 +39,7 @@ export async function getUserInfoEmbed(
|
|||
name: `User: ${user.username}#${user.discriminator}`,
|
||||
};
|
||||
|
||||
const avatarURL = user.avatarURL() || user.defaultAvatarURL;
|
||||
const avatarURL = user.displayAvatarURL();
|
||||
embed.author.icon_url = avatarURL;
|
||||
|
||||
const createdAt = moment.utc(user.createdAt, "x");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue