diff --git a/commands/snowflake.js b/commands/snowflake.js index 6fcf096..99c862b 100644 --- a/commands/snowflake.js +++ b/commands/snowflake.js @@ -1,4 +1,5 @@ exports.run = async (message, args) => { + if (!args[0]) return `${message.author.mention}, you need to provide a snowflake ID!`; if (!args[0].match(/^\d+$/) && args[0] < 21154535154122752) return `${message.author.mention}, that's not a valid snowflake!`; return new Date((args[0] / 4194304) + 1420070400000).toUTCString(); }; diff --git a/commands/wide.js b/commands/wide.js index 3e9030e..2b86bca 100644 --- a/commands/wide.js +++ b/commands/wide.js @@ -9,6 +9,7 @@ exports.run = async (message) => { if (image === undefined) return `${message.author.mention}, you need to provide an image to stretch!`; gm(image.data).size(async (error, size) => { if (error) throw error; + if (size.width > 10000) return `${message.author.mention}, this image is too wide!`; const data = gm(image.data).resize(`${(size.width * 19) / 2}x${size.height / 2}!`); const resultBuffer = await gmToBuffer(data); return message.channel.createMessage("", {