Update misc_tools.py

This commit is contained in:
yasirarism 2023-07-11 22:35:57 +07:00 committed by GitHub
parent 8e6d62cf7a
commit 3f7c8a1d18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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