Skip to content

Commit

Permalink
Update helper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ufoptg authored Feb 8, 2024
1 parent 72d7547 commit 27a42e1
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions pyUltroid/fns/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
Repo = None


import asyncio
import multiprocessing
from concurrent.futures import ThreadPoolExecutor
from functools import partial, wraps
Expand Down Expand Up @@ -96,31 +95,6 @@ def inline_mention(user, custom=None, html=False):
return f"[{mention_text}](https://t.me/{user.username})"
return mention_text

async def check_reply_to(event):
replytoIDS = [event.client.me.id]
if (event.is_private and event.is_reply) or (
event.is_reply and event.reply_to_msg_id
):
try:
replied_message = await event.client.get_messages(
event.chat_id, ids=event.reply_to_msg_id
)
if replied_message.from_id:
user_id = replied_message.from_id.user_id
if user_id in replytoIDS:
return True
elif replied_message.peer_id and not replied_message.from_id:
channel_id = replied_message.peer_id.channel_id
if channel_id in replytoIDS:
return True
# If neither user_id nor channel_id is in truai, return False
return False
except Exception as e:
# Log the exception for debugging
print(f"Exception: {e}")
return False
return False

async def check_reply_to(event):
truai = [event.client.me.id] #Adding to this list will allow for anon or masked usermode
if (event.is_private and event.is_reply) or (
Expand Down

0 comments on commit 27a42e1

Please sign in to comment.