const { EmbedBuilder } = require("discord.js"); module.exports = { name: "kiss", category: 'game', description: "Fait un bisou à un utilisateur mentionné ou à un utilisateur dont le nom est fourni en argument.", emote: '💋', utilisation : '+kiss [@user]', async execute(message, args, client) { let user = message.mentions.members.first() || message.guild.members.cache.get(args[0]); kiss = ['https://cdn.weeb.sh/images/rymvn6_wW.gif','https://cdn.weeb.sh/images/H1a42auvb.gif','https://cdn.weeb.sh/images/H1Gx2aOvb.gif','https://cdn.weeb.sh/images/rJrCj6_w-.gif','https://cdn.weeb.sh/images/B13D2aOwW.gif','https://cdn.weeb.sh/images/BJLP3a_Pb.gif','https://cdn.weeb.sh/images/Hy-oQl91z.gif','https://cdn.weeb.sh/images/SJINn6OPW.gif','https://cdn.weeb.sh/images/ByiMna_vb.gif','https://cdn.weeb.sh/images/rymvn6_wW.gif','https://cdn.weeb.sh/images/BJSdQRtFZ.gif','https://cdn.weeb.sh/images/S1PCJWASf.gif','https://cdn.weeb.sh/images/SJ3dXCKtW.gif','https://cdn.weeb.sh/images/HJlWhpdw-.gif','https://cdn.weeb.sh/images/rkde2aODb.gif','https://cdn.weeb.sh/images/SybPhp_wZ.gif','https://cdn.weeb.sh/images/rkFSiEedf.gif','https://cdn.weeb.sh/images/r1cB3aOwW.gif','https://cdn.weeb.sh/images/BJv0o6uDZ.gif','https://cdn.weeb.sh/images/B13D2aOwW.gif','https://cdn.weeb.sh/images/Skv72TuPW.gif','https://cdn.weeb.sh/images/S1qZksSXG.gif','https://cdn.weeb.sh/images/Sk1k3TdPW.gif','https://cdn.weeb.sh/images/S1-KXsh0b.gif','https://cdn.weeb.sh/images/B1yv36_PZ.gif','https://cdn.weeb.sh/images/BJx2l0ttW.gif'] let randomKiss = kiss[Math.floor(Math.random() * kiss.length)]; if (user) { let embed = new EmbedBuilder() .setDescription(`💋 **${message.author.username}** fait un bisou à **${user.user.username}**`) .setImage(randomKiss) .setTimestamp() .setAuthor({name: message.author.username,iconURL: message.author.avatarURL({ dynamic: true })}) .setFooter({text: client.user.username,iconURL: client.user.displayAvatarURL({ dynamic: true })}); message.channel.send({ embeds: [embed] }); } else { if (args[0]) { let member = message.guild.members.cache.find(m => m.displayName.toLowerCase().indexOf(args[0].toLowerCase()) > -1); if (!member) member = client; let embed = new EmbedBuilder() .setDescription(`💋 **${message.author.username}** fait un bisou à **${member.user.username}**`) .setImage(randomKiss) .setTimestamp() .setAuthor({name: message.author.username,iconURL: message.author.avatarURL({ dynamic: true })}) .setFooter({text: client.user.username,iconURL: client.user.displayAvatarURL({ dynamic: true })}); message.channel.send({ embeds: [embed] }); } else { let randomMember = message.guild.members.cache.random(); let embed = new EmbedBuilder() .setDescription(`💋 **${message.author.username}** fait un bisou à **${randomMember.user.username}**`) .setImage(randomKiss) .setTimestamp() .setAuthor({name: message.author.username,iconURL: message.author.avatarURL({ dynamic: true })}) .setFooter({text: client.user.username,iconURL: client.user.displayAvatarURL({ dynamic: true })}); message.channel.send({ embeds: [embed] }); } } }, };