From ddc154c138788c02119bbba8a523348e3bc0b4aa Mon Sep 17 00:00:00 2001 From: Akrasia Date: Thu, 22 Apr 2021 08:25:22 +0000 Subject: [PATCH] Rename ships.js --- commands/fun/{shipname.js => ships.js} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename commands/fun/{shipname.js => ships.js} (76%) diff --git a/commands/fun/shipname.js b/commands/fun/ships.js similarity index 76% rename from commands/fun/shipname.js rename to commands/fun/ships.js index 3cf9ab0..020f94e 100644 --- a/commands/fun/shipname.js +++ b/commands/fun/ships.js @@ -10,10 +10,10 @@ module.exports = { }, async execute(message, msg, args, cmd, prefix, mention, client) { - const start = message.mentions.members.first().user.username || args[0] - const end = message.mentions.members.map(m => m.user.username).splice(1) || args[1] - if (!start || !end) return message.channel.send(this.help); - let finalName = start.slice(0, Math.floor(start.length / 2))+end.slice(Math.floor(end.length / 2)) + const start = message.mentions.members.first() + const end = message.mentions.members.map(m => m.user.username).splice(1) + if (!start && !end || !start || !end) return message.channel.send(this.help); + let finalName = `${start.slice(0, Math.floor(start.length / 2))+end.slice(Math.floor(end.length / 2))}` const Embed = new Discord.MessageEmbed() .setColor("PURPLE") .setThumbnail("https://media.discordapp.net/attachments/550550810145325056/834696984605622292/unknown.png?width=551&height=418")