Skip to content

Small discord.js Avatar image

Avatar issue example

enter image description here

I am trying to do the discord.js avatar command and it works. It sends the image it needs to send but the issue is that the image sent is small compared to other bots. Am using the command handler in the discord.js guide

const Discord = require('discord.js');
module.exports = {
    name: 'avatar',
    description: 'Get the avatar URL of the tagged user(s), or your own avatar.',
    aliases: ['av', 'a'],
    usage: '[commandname]',
    cooldown: 10,
    execute(message) {
        if (!message.mentions.users.size) {
            const embed = new Discord.MessageEmbed()
                .setImage({ format: 'png' }));

        const mention = message.mentions.members.first();
        const Embed = new Discord.MessageEmbed()
            .setImage(mention.user.displayAvatarURL({ format: 'png' }));




You can add a size option like how you did with you format

.displayAvatarURL({ format: 'png', size: size_you_want }));

the size as to be one of the following 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, For more info you can view the options here