mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-03 19:14:51 +00:00
Replace multiple == checks with in (#10)
* Replace multiple `==` checks with `in` * Format code with black and isort Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> Co-authored-by: yasirarism <55983182+yasirarism@users.noreply.github.com>
This commit is contained in:
parent
0dbab68a39
commit
a3410caac1
2 changed files with 5 additions and 5 deletions
|
|
@ -453,7 +453,7 @@ async def prvt_msg(_, c_q):
|
|||
|
||||
user_id, flname, sender_id, msg = PRVT_MSGS[msg_id]
|
||||
|
||||
if c_q.from_user.id == user_id or c_q.from_user.id == sender_id:
|
||||
if c_q.from_user.id in (user_id, sender_id):
|
||||
await c_q.answer(msg, show_alert=True)
|
||||
else:
|
||||
await c_q.answer(f"only {flname} can see this Private Msg!", show_alert=True)
|
||||
|
|
@ -469,7 +469,7 @@ async def destroy_msg(_, c_q):
|
|||
|
||||
user_id, flname, sender_id, msg = PRVT_MSGS[msg_id]
|
||||
|
||||
if c_q.from_user.id == user_id or c_q.from_user.id == sender_id:
|
||||
if c_q.from_user.id in (user_id, sender_id):
|
||||
del PRVT_MSGS[msg_id]
|
||||
by = "receiver" if c_q.from_user.id == user_id else "sender"
|
||||
await c_q.edit_message_text(f"This secret message is ☠️destroyed☠️ by msg {by}")
|
||||
|
|
|
|||
|
|
@ -140,9 +140,9 @@ async def kang_sticker(c, m):
|
|||
if "image" in reply.document.mime_type:
|
||||
# mime_type: image/webp
|
||||
resize = True
|
||||
elif (
|
||||
MessageMediaType.VIDEO == reply.document.mime_type
|
||||
or MessageMediaType.ANIMATION == reply.document.mime_type
|
||||
elif reply.document.mime_type in (
|
||||
MessageMediaType.VIDEO,
|
||||
MessageMediaType.ANIMATION,
|
||||
):
|
||||
# mime_type: application/video
|
||||
videos = True
|
||||
|
|
|
|||
Loading…
Reference in a new issue