Skip to content

Commit

Permalink
Update misc_tools.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yasirarism authored Sep 10, 2024
1 parent 2c9cec0 commit a5fa7fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions misskaty/plugins/misc_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,8 @@ async def gsearch(self, message):
if len(message.command) == 1:
return await message.reply("Give a query to search in Google!")
def shorten_text(text):
if len(text) > 30:
return text[:30] + "..."
if len(text) > 150:
return text[:150] + "..."
return text
query = message.text.split(maxsplit=1)[1]
msg = await message.reply_text(f"**Googling** for `{query}` ...")
Expand Down Expand Up @@ -362,7 +362,7 @@ def shorten_text(text):
except Exception:
exc = traceback.format_exc()
return await msg.edit(exc)
await msg.reply_msg(
await msg.edit_msg(
text=f"<b>Ada {total} Hasil Pencarian dari {query}:</b>\n{res}<b>GoogleSearch by @{BOT_USERNAME}</b>",
disable_web_page_preview=True,
)
Expand Down

0 comments on commit a5fa7fc

Please sign in to comment.