From 643c2f8bf4529528db342795929fb8ec910aafdc Mon Sep 17 00:00:00 2001 From: derpystuff <3515180-derpystuff@users.noreply.gitlab.com> Date: Mon, 26 Jun 2023 13:25:17 +0200 Subject: [PATCH] update tiktok command --- commands/interaction/subcommands/tts/tiktok.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/commands/interaction/subcommands/tts/tiktok.js b/commands/interaction/subcommands/tts/tiktok.js index 90779ac..0ab5a1c 100644 --- a/commands/interaction/subcommands/tts/tiktok.js +++ b/commands/interaction/subcommands/tts/tiktok.js @@ -22,14 +22,17 @@ module.exports = { name: 'text', description: 'Text', type: ApplicationCommandOptionTypes.STRING, - required: true, - maxLength: 100 + required: true } ], run: async (context, args) => { try { await context.respond({ data: {}, type: InteractionCallbackTypes.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE }) + if(args.text.length >= 101) return await context.editOrRespond({ + embeds: [createEmbed("warning", context, "Text too long (must be 100 or shorter).")] + }) + let audio = await tiktok(context, args.text, args.voice) await context.editOrRespond({