Skip to content

Commit

Permalink
fix: carbon text markdown (TgCatUB#345)
Browse files Browse the repository at this point in the history
Get replied message instead of text when generating a carbon from a reply
  • Loading branch information
luisbandalap authored Jun 27, 2023
1 parent f812757 commit a9477fd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions userbot/plugins/carbon.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ async def carbon_api(event):
query = event.pattern_match.group(1)
replied_msg = await event.get_reply_message()
if not query and replied_msg:
query = replied_msg.text
query = replied_msg.message
if query is None:
return await edit_delete(cat, "No text was given")

Expand Down Expand Up @@ -107,7 +107,7 @@ async def kar1_api(event):
query = event.pattern_match.group(1)
replied_msg = await event.get_reply_message()
if not query and replied_msg:
query = replied_msg.text
query = replied_msg.message
if query is None:
return await edit_delete(cat, "No text was given")

Expand Down Expand Up @@ -153,7 +153,7 @@ async def kar2_api(event):
query = event.pattern_match.group(1)
replied_msg = await event.get_reply_message()
if not query and replied_msg:
query = replied_msg.text
query = replied_msg.message
if query is None:
return await edit_delete(cat, "No text was given")

Expand Down Expand Up @@ -201,7 +201,7 @@ async def kar3_api(event):
query = event.pattern_match.group(1)
replied_msg = await event.get_reply_message()
if not query and replied_msg:
query = replied_msg.text
query = replied_msg.message
if query is None:
return await edit_delete(cat, "No text was given")

Expand Down Expand Up @@ -249,7 +249,7 @@ async def kar4_api(event):
query = event.pattern_match.group(1)
replied_msg = await event.get_reply_message()
if not query and replied_msg:
query = replied_msg.text
query = replied_msg.message
if query is None:
return await edit_delete(cat, "No text was given")

Expand Down Expand Up @@ -332,7 +332,7 @@ async def kargb_api(event):
query = event.pattern_match.group(1)
replied_msg = await event.get_reply_message()
if not query and replied_msg:
query = replied_msg.text
query = replied_msg.message
if query is None:
return await edit_delete(cat, "No text was given")

Expand Down

0 comments on commit a9477fd

Please sign in to comment.