From 3f7c8a1d18c4c5e036ade129ca6c0ddd7b98cb78 Mon Sep 17 00:00:00 2001 From: yasirarism <55983182+yasirarism@users.noreply.github.com> Date: Tue, 11 Jul 2023 22:35:57 +0700 Subject: [PATCH] Update misc_tools.py --- misskaty/plugins/misc_tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misskaty/plugins/misc_tools.py b/misskaty/plugins/misc_tools.py index 8b7532f1..6b7de18d 100644 --- a/misskaty/plugins/misc_tools.py +++ b/misskaty/plugins/misc_tools.py @@ -94,9 +94,9 @@ async def kbbi_search(_, ctx: Client): @app.on_cmd("carbon") async def carbon_make(self: Client, ctx: Message): - if ctx.reply_to_message.text: + if ctx.reply_to_message and ctx.reply_to_message.text: text = ctx.reply_to_message.text - elif ctx.reply_to_message.caption: + elif ctx.reply_to_message and ctx.reply_to_message.caption: text = ctx.reply_to_message.caption elif len(ctx.command) > 1: text = ctx.input