Skip to content

Commit

Permalink
cek
Browse files Browse the repository at this point in the history
  • Loading branch information
yasirarism authored Sep 21, 2023
1 parent c0bbbf1 commit eb37d7d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
3 changes: 1 addition & 2 deletions misskaty/plugins/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ async def log_file(_, ctx: Message, strings):
"title": "MissKatyLogs"
}
pastelog = (await fetch.post("https://paste.yasirapi.eu.org/api/pastes", json=data)).json()
LOGGER.info(pastelog)
await msg.edit_msg(f"<a href='https://paste.yasirapi.eu.org/{pastelog.get('paste_id')}'>Here the Logs</a>\nlog size: {get_readable_file_size(os.path.getsize('MissKatyLogs.txt'))}")
except Exception as err:
LOGGER.error(err)
Expand All @@ -114,7 +113,7 @@ async def log_file(_, ctx: Message, strings):
]
),
)
await msg.delete_msg()
await msg.delete_msg()
elif len(ctx.command) == 2:
val = ctx.text.split()
tail = await shell_exec(f"tail -n {val[1]} -v MissKatyLogs.txt")
Expand Down
2 changes: 1 addition & 1 deletion misskaty/plugins/genss.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async def genss(self: Client, ctx: Message, strings):
download_file_path = os.path.join("downloads/", file_name)
downloader = SmartDL(url, download_file_path, progress_bar=False, timeout=10, verify=False)
try:
downloader.start(blocking=False)
downloader.start(blocking=False, verify=False)
except Exception as err:
return await pesan.edit(str(err))
c_time = time.time()
Expand Down
14 changes: 7 additions & 7 deletions misskaty/plugins/inline_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
~ info [user id/username] - Check info about a user.
"""

keywords_list = ["imdb", "pypi", "git", "google", "calc", "secretmsg", "info", "botapi"]
keywords_list = ["imdb", "pypi", "git", "google", "secretmsg", "info", "botapi"]

PRVT_MSGS = {}
LOGGER = getLogger("MissKaty")
Expand Down Expand Up @@ -406,12 +406,12 @@ async def inline_menu(self, inline_query: InlineQuery):
srch_results = json.loads(search_results.text)
item = srch_results.get("items")
data = []
for sraeo in item:
title = sraeo.get("full_name")
link = sraeo.get("html_url")
deskripsi = sraeo.get("description")
lang = sraeo.get("language")
message_text = f"🔗: {sraeo.get('html_url')}\n\n└─🍴Forks: {sraeo.get('forks')} ┃┃ 🌟Stars: {sraeo.get('stargazers_count')}\n\n"
for result in item:
title = result.get("full_name")
link = result.get("html_url")
deskripsi = result.get("description")[:25] if len(result.get("description")) > 25 else result.get("description")
lang = result.get("language")
message_text = f"🔗: {result.get('html_url')}\n\n└─🍴Forks: {result.get('forks')} ┃┃ 🌟Stars: {sraeo.get('stargazers_count')}\n\n"
message_text += f"<b>Description:</b> {deskripsi}\n"
message_text += f"<b>Language:</b> {lang}"
data.append(
Expand Down
6 changes: 4 additions & 2 deletions misskaty/plugins/locks.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,12 @@ async def current_chat_permissions(chat_id):
except FloodWait as e:
await asyncio.sleep(e.value)
perm = (await app.get_chat(chat_id)).permissions
try:
perm.can_send_messages
except:
LOGGER.error(f"Got error in chat: {chat_id}, perm: {perm}") # For debug
if perm.can_send_messages:
perms.append("can_send_messages")
else:
LOGGER.info(f"debug perm: {perm}") # Temporary debug, idk why give error no object
if perm.can_send_media_messages:
perms.append("can_send_media_messages")
if perm.can_send_audios:
Expand Down

0 comments on commit eb37d7d

Please sign in to comment.