nyx/command/Fun/ship.js

43 lines
1.2 KiB
JavaScript
Raw Permalink Normal View History

2021-09-06 12:38:25 +02:00
const { MessageEmbed } = require("discord.js");
const block = "⬛";
const heart = "🟥";
2021-09-06 12:38:25 +02:00
module.exports = {
name: "ship",
description: "Ship an user to an user",
usage: "(User) (User)",
category: "Fun",
options: [
{
type: 6,
name: "1stuser",
description: "The user you want to ship",
required: true,
},
{
type: 6,
name: "2nduser",
description: "The user you want to ship",
required: true,
},
],
type: "CHAT_INPUT",
run: async (client, interaction, args) => {
const user1 = interaction.guild.members.cache.get(args[0]).user.username;
const user2 = interaction.guild.members.cache.get(args[1]).user.username;
const loveEmbed = new MessageEmbed()
2021-09-06 12:38:25 +02:00
.setColor("dd2e44")
2022-03-02 15:37:01 +01:00
.setFooter({ text: `Shipped by ${interaction.user.tag}` })
2021-09-06 12:38:25 +02:00
.setTimestamp()
.setTitle(`💘 | Shipping ${user1} and ${user2} | 💘`)
.setDescription(`🔻 | ${user1} \n${ship()}\n🔺 | ${user2}`);
interaction.followUp({ embeds: [loveEmbed] });
2021-09-06 12:38:25 +02:00
},
};
function ship() {
const hearts = Math.floor(Math.random() * 100);
const hearte = hearts / 10;
const str = `${heart.repeat(hearte)}${block.repeat(10 - hearte)} ${hearts}%`;
return str;
}