From 8e6d62cf7a4c3ca164be2923ae4c1cea9a413e84 Mon Sep 17 00:00:00 2001 From: yasirarism <55983182+yasirarism@users.noreply.github.com> Date: Tue, 11 Jul 2023 22:32:29 +0700 Subject: [PATCH] Update misc_tools.py --- misskaty/plugins/misc_tools.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/misskaty/plugins/misc_tools.py b/misskaty/plugins/misc_tools.py index 2fdf4fbf..8b7532f1 100644 --- a/misskaty/plugins/misc_tools.py +++ b/misskaty/plugins/misc_tools.py @@ -94,16 +94,16 @@ async def kbbi_search(_, ctx: Client): @app.on_cmd("carbon") async def carbon_make(self: Client, ctx: Message): - if len(ctx.command) == 1 or not ctx.reply_to_message: - return await ctx.reply( - "Please reply text to make carbon or add text after command." - ) if ctx.reply_to_message.text: text = ctx.reply_to_message.text elif ctx.reply_to_message.caption: text = ctx.reply_to_message.caption - else: + elif len(ctx.command) > 1: text = ctx.input + else: + return await ctx.reply( + "Please reply text to make carbon or add text after command." + ) json_data = { "code": text, "backgroundColor": "#1F816D",