Fix merge conflict
This commit is contained in:
commit
757c86ec05
1 changed files with 4 additions and 2 deletions
|
@ -16,10 +16,12 @@ export const AvatarCmd = utilityCmd({
|
||||||
async run({ message: msg, args, pluginData }) {
|
async run({ message: msg, args, pluginData }) {
|
||||||
const user = args.user || msg.author;
|
const user = args.user || msg.author;
|
||||||
if (!(user instanceof UnknownUser)) {
|
if (!(user instanceof UnknownUser)) {
|
||||||
const extention = user.avatarURL.slice(user.avatarURL.lastIndexOf("."), user.avatarURL.lastIndexOf("?"));
|
let extension = user.avatarURL.slice(user.avatarURL.lastIndexOf("."), user.avatarURL.lastIndexOf("?"));
|
||||||
|
// Some pngs can have the .jpg extention for some reason, so we always use .png for static images
|
||||||
|
extension = extension === ".gif" ? extension : ".png";
|
||||||
const avatarUrl = user.avatarURL.slice(0, user.avatarURL.lastIndexOf("."));
|
const avatarUrl = user.avatarURL.slice(0, user.avatarURL.lastIndexOf("."));
|
||||||
const embed: EmbedOptions = {
|
const embed: EmbedOptions = {
|
||||||
image: { url: avatarUrl + `${extention}?size=2048` },
|
image: { url: avatarUrl + `${extension}?size=2048` },
|
||||||
};
|
};
|
||||||
embed.title = `Avatar of ${user.username}#${user.discriminator}:`;
|
embed.title = `Avatar of ${user.username}#${user.discriminator}:`;
|
||||||
msg.channel.createMessage({ embed });
|
msg.channel.createMessage({ embed });
|
||||||
|
|
Loading…
Add table
Reference in a new issue