From 511111cf59f494a5b1f6f20bacff357b549b9952 Mon Sep 17 00:00:00 2001 From: Supositware Date: Tue, 16 Aug 2022 22:25:23 +0200 Subject: [PATCH] Don't error when no args --- commands/fun/tweet.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/commands/fun/tweet.js b/commands/fun/tweet.js index 911df03..8eca551 100644 --- a/commands/fun/tweet.js +++ b/commands/fun/tweet.js @@ -28,6 +28,10 @@ export default { ratelimit: 3, cooldown: 3600, async execute(interaction) { + if (!interaction.options.getString('content') && !interaction.options.getAttachment('image')) { + return interaction.reply({ content: 'Uh oh! You are missing any content for me to tweet!', ephemeral: true }); + } + await interaction.deferReply({ ephemeral: false }); let tweet = interaction.options.getString('content'); const attachment = interaction.options.getAttachment('image');