mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-06 20:04:51 +00:00
Update misc_tools.py
This commit is contained in:
parent
2c9cec0fcc
commit
a5fa7fc5ca
1 changed files with 3 additions and 3 deletions
|
|
@ -323,8 +323,8 @@ async def gsearch(self, message):
|
||||||
if len(message.command) == 1:
|
if len(message.command) == 1:
|
||||||
return await message.reply("Give a query to search in Google!")
|
return await message.reply("Give a query to search in Google!")
|
||||||
def shorten_text(text):
|
def shorten_text(text):
|
||||||
if len(text) > 30:
|
if len(text) > 150:
|
||||||
return text[:30] + "..."
|
return text[:150] + "..."
|
||||||
return text
|
return text
|
||||||
query = message.text.split(maxsplit=1)[1]
|
query = message.text.split(maxsplit=1)[1]
|
||||||
msg = await message.reply_text(f"**Googling** for `{query}` ...")
|
msg = await message.reply_text(f"**Googling** for `{query}` ...")
|
||||||
|
|
@ -362,7 +362,7 @@ async def gsearch(self, message):
|
||||||
except Exception:
|
except Exception:
|
||||||
exc = traceback.format_exc()
|
exc = traceback.format_exc()
|
||||||
return await msg.edit(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>",
|
text=f"<b>Ada {total} Hasil Pencarian dari {query}:</b>\n{res}<b>GoogleSearch by @{BOT_USERNAME}</b>",
|
||||||
disable_web_page_preview=True,
|
disable_web_page_preview=True,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue