diff --git a/commands/General/userinfo.js b/commands/General/userinfo.js index e21f79d7..f97cd10f 100644 --- a/commands/General/userinfo.js +++ b/commands/General/userinfo.js @@ -23,7 +23,7 @@ class Userinfo extends Command { const isID = !isNaN(args[0]); - var user; + let user; if (!args[0]) user = message.author; if (message.mentions.users.first()) user = message.mentions.users.first(); diff --git a/commands/Moderation/giveaway.js b/commands/Moderation/giveaway.js index fab89083..e90878f7 100644 --- a/commands/Moderation/giveaway.js +++ b/commands/Moderation/giveaway.js @@ -34,8 +34,8 @@ class Giveaway extends Command { if (!winnersCount) return message.error("moderation/giveaway:INVALID_CREATE", { prefix: data.guild.prefix }); if (isNaN(winnersCount) || winnersCount > 10 || winnersCount < 1) return message.error("misc:INVALID_NUMBER_RANGE", { min: 1, max: 10 }); - var drop = (args[3] === "true"), - prize = args.slice(3).join(" "); + const drop = (args[3] === "true"); + let prize = args.slice(3).join(" "); if (drop) prize = args.slice(4).join(" "); else prize = args.slice(3).join(" "); diff --git a/commands/NSFW/hentai.js b/commands/NSFW/hentai.js index 3c989677..3385c7d0 100644 --- a/commands/NSFW/hentai.js +++ b/commands/NSFW/hentai.js @@ -20,7 +20,7 @@ class Hentai extends Command { async run(message, args, data) { const category = args[0]; - var gif = null; + let gif = null; const embed = new Discord.MessageEmbed() .setColor(data.config.embed.color) .setFooter({ diff --git a/commands/Owner/debug.js b/commands/Owner/debug.js index 228f93f9..29a594f8 100644 --- a/commands/Owner/debug.js +++ b/commands/Owner/debug.js @@ -40,7 +40,7 @@ class Debug extends Command { id: member.id, }); - var newValue = 0; + let newValue = 0; if (action === "set") { newValue = parseInt(amount, 10); diff --git a/commands/Owner/say.js b/commands/Owner/say.js index 7cc787d6..23597886 100644 --- a/commands/Owner/say.js +++ b/commands/Owner/say.js @@ -22,9 +22,10 @@ class Say extends Command { // Arguments split const split = "++"; args = args.join(" ").split(split); - for (var i = 0; i < args.length; i++) args[i] = args[i].trim(); + for (let i = 0; i < args.length; i++) args[i] = args[i].trim(); - if (message.attachments.size > 0) var attachment = message.attachments.first().url; + let attachment = null; + if (message.attachments.size > 0) attachment = message.attachments.first(); if (args[1] && !args[2]) { message.delete(); @@ -34,7 +35,10 @@ class Say extends Command { setTimeout(function () { if (attachment) saychannel.send({ content: args[0], - files: [attachment] + files: [{ + name: attachment.name, + attachment: attachment.url + }] }); else saychannel.send({ content: args[0] @@ -47,7 +51,10 @@ class Say extends Command { setTimeout(function () { if (attachment) saychannel.send({ content: args[0], - files: [attachment] + files: [{ + name: attachment.name, + attachment: attachment.url + }] }); else saychannel.send({ content: args[0] @@ -61,7 +68,10 @@ class Say extends Command { setTimeout(function () { if (attachment) saychannel.send({ content: args[0], - files: [attachment] + files: [{ + name: attachment.name, + attachment: attachment.url + }] }); else saychannel.send({ content: args[0]