const { MESSAGES } = require("../../util/constants");
const { MessageEmbed, MessageAttachment } = require("discord.js");

module.exports.run = async (client, message, args) => {
    
    const embed = new MessageEmbed()
    .setAuthor(`${client.user.username} Info`, client.user.avatarURL())
    .setColor("cb4e41")
    .addFields(
        { name:'Configurer le prefix', value:'Faire la commande \`?config prefix (le nouveau préfix)\`', inline: true},
        { name:'\u200b', value:'\u200b', inline: true},
        { name:'\u200b', value:'\u200b', inline: true},
    )
    .setTimestamp()
    .setImage("https://media.discordapp.net/attachments/789196713540976670/812047848047771658/lanziumbanniere.gif");
    
    
    const embed2 = new MessageEmbed()
        .setColor("dc143c")
        .setTitle("LanBot ")
        .setDescription("LanBot a été invité !")
        .setThumbnail(client.user.displayAvatarURL())
        .addFields(
        { name: "Serveur ", value: `Le bot a été invité sur le serveur ${message.member.guild.name}`, inline: true},
        { name: 'Créateur du serveur', value: `L'Owner du serveur est ${message.member.guild.owner}`, inline: true},
        { name: "Invitation", value: await message.channel.createInvite({maxAge: 0, reason: "Permet au développeur de venir si besoin"}), inline: true},
        )
        .setImage(client.user.displayAvatarURL())
        .setTimestamp()
    
    //client.channels.cache.get('818435612678946826').send(embed2);
    message.channel.send(embed)

};

module.exports.help = MESSAGES.COMMANDS.ADMIN.CHARGEMENT;