Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
Signed-off-by: Yasir Aris M <[email protected]>
  • Loading branch information
yasirarism committed Aug 10, 2024
1 parent 673c709 commit 3364fa8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions misskaty/plugins/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,9 +762,9 @@ async def check_warns(_, message, strings):
@capture_err
@use_chat_lang()
async def report_user(_, ctx: Message, strings) -> "Message":
if not ctx.reply_to_message:
if len(ctx.text.split()) <= 1 and not ctx.reply_to_message:
return await ctx.reply_msg(strings("report_no_reply"))
reply = ctx.reply_to_message
reply = ctx.reply_to_message if ctx.reply_to_message else ctx
reply_id = reply.from_user.id if reply.from_user else reply.sender_chat.id
user_id = ctx.from_user.id if ctx.from_user else ctx.sender_chat.id
if reply_id == user_id:
Expand Down Expand Up @@ -796,7 +796,7 @@ async def report_user(_, ctx: Message, strings) -> "Message":
# return bots or deleted admins
continue
text += f"<a href='tg://user?id={admin.user.id}'>\u2063</a>"
await ctx.reply_msg(text, reply_to_message_id=ctx.reply_to_message.id)
await reply.reply_msg(text)


@app.on_cmd("set_chat_title", self_admin=True, group_only=True)
Expand Down
4 changes: 2 additions & 2 deletions misskaty/plugins/grup_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from logging import getLogger

from PIL import Image, ImageChops, ImageDraw, ImageFont
from pyrogram import enums, filters
from pyrogram import Client, enums, filters
from pyrogram.enums import ChatMemberStatus as CMS
from pyrogram.errors import (
ChatAdminRequired,
Expand Down Expand Up @@ -95,7 +95,7 @@ def welcomepic(pic, user, chat, id, strings):
filters.group & filters.chat([-1001128045651, -1001777794636]), group=6
)
@use_chat_lang()
async def member_has_joined(c: app, member: ChatMemberUpdated, strings):
async def member_has_joined(c: Client, member: ChatMemberUpdated, strings):
if not (
member.new_chat_member
and member.new_chat_member.status not in {CMS.BANNED}
Expand Down
2 changes: 1 addition & 1 deletion misskaty/plugins/notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ async def save_notee(_, message):
if replied_message.voice:
_type = "voice"
file_id = replied_message.voice.file_id
if replied_message.reply_markup and "~" not in data:
if replied_message.reply_markup and not findall(r"\[.+\,.+\]", data):
if urls := extract_urls(replied_message.reply_markup):
response = "\n".join(
[f"{name}=[{text}, {url}]" for name, text, url in urls]
Expand Down

0 comments on commit 3364fa8

Please sign in to comment.