diff --git a/commands/General/avatar.c.js b/commands/General/avatar.c.js index 1b4feb12..420518f6 100644 --- a/commands/General/avatar.c.js +++ b/commands/General/avatar.c.js @@ -24,7 +24,7 @@ class AvatarContext extends BaseCommand { * @param {Object} data */ async execute(client, interaction) { - const avatarURL = interaction.targetUser.avatarURL({ size: 2048 }); + const avatarURL = interaction.targetUser.displayAvatarURL({ size: 2048 }); const embed = client.embed({ image: avatarURL }); interaction.reply({ diff --git a/commands/General/avatar.js b/commands/General/avatar.js index 449d6fea..e3775c5d 100644 --- a/commands/General/avatar.js +++ b/commands/General/avatar.js @@ -47,8 +47,9 @@ class Avatar extends BaseCommand { */ async execute(client, interaction) { const member = interaction.options.getMember("user") || interaction.member; - const avatarURL = interaction.options.getBoolean("server") ? member.avatarURL({ size: 2048 }) : member.user.avatarURL({ size: 2048 }); + const avatarURL = interaction.options.getBoolean("server") ? member.displayAvatarURL({ size: 2048 }) : member.user.displayAvatarURL({ size: 2048 }); const embed = client.embed({ image: avatarURL }); + console.log(avatarURL); interaction.reply({ embeds: [embed], diff --git a/events/CommandHandler.js b/events/CommandHandler.js index 8af21ed0..be382fdc 100644 --- a/events/CommandHandler.js +++ b/events/CommandHandler.js @@ -53,7 +53,9 @@ class CommandHandler extends BaseEvent { userData.markModified("achievements"); await userData.save(); - interaction.user.send(args); + try { + interaction.user.send(args); + } catch (e) { /**/ } } client.logger.cmd(`User ${interaction.user.getUsername()} used ${command.command.name} in ${interaction.guild ? interaction.guild.name : "DM"} with arguments: ${interaction.options.data.length > 0 ? interaction.options.data.map(arg => { return `${arg.name}: ${arg.value}`; }).join(", ") : "no args" }`);