{"size": 837, "ext": "js", "max_stars_repo_path": "commands/utility/avatar.js", "max_stars_repo_name": "LukasEifel/BotEifel", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "commands/utility/avatar.js", "max_issues_repo_name": "LukasEifel/BotEifel", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "commands/utility/avatar.js", "max_forks_repo_name": "LukasEifel/BotEifel", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 38.0454545455, "max_line_length": 90, "alphanum_fraction": 0.5567502987}
module.exports = {
    name: 'avatar',
    description: 'send avatar-URL',
    aliases: ['icon', 'png'],
    execute(msg, args) {
        const Discord = require(`discord.js`);

        const embed = new Discord.MessageEmbed();
        if(!msg.mentions.users.size) {
            embed.setTitle(msg.author.tag);
            embed.setImage(msg.author.displayAvatarURL({ format: `png`, dynamic: true }));
            embed.setURL(msg.author.displayAvatarURL({ format: `png`, dynamic: true }));
        } else {
            msg.mentions.users.map(user => {
                embed.setTitle(user.tag);
                embed.setImage(user.displayAvatarURL({ format: `png`, dynamic: true}));
                embed.setURL(user.displayAvatarURL({ format: `png`, dynamic: true}));
            });
        }
        msg.channel.send(embed);
    },
};