From 274a7ab2ee890abf60550a184c31cf435c3df425 Mon Sep 17 00:00:00 2001 From: SrIzan10 <66965250+SrIzan10@users.noreply.github.com> Date: Sat, 5 Nov 2022 19:14:40 +0100 Subject: [PATCH] feat: nothing to cursivify message --- commands/fun/cursivify.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/commands/fun/cursivify.ts b/commands/fun/cursivify.ts index de9b112..90ed6e1 100644 --- a/commands/fun/cursivify.ts +++ b/commands/fun/cursivify.ts @@ -15,7 +15,12 @@ export default commandModule({ try { const repliedmessage = await ctx.message.channel.messages.fetch(ctx.message.reference!.messageId!); const trimmedstring = repliedmessage.content.replaceAll('*', '') - await ctx.reply(`*${trimmedstring}*`) + if (trimmedstring.length === 0) { + await ctx.reply('No hay nada que cursivificar!') + } else { + await ctx.reply(`*${trimmedstring}*`) + } + } catch (err) { await ctx.reply('Asegúrate que estás respondiendo al mensaje que quieras hacer cursiva!') }