Skip to content

Commit

Permalink
Merge pull request #4 from ufoptg/patch-2
Browse files Browse the repository at this point in the history
Patch 2
  • Loading branch information
ufoptg authored Feb 8, 2024
2 parents 089c119 + dec8f05 commit 356c959
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 40 deletions.
14 changes: 0 additions & 14 deletions assistant/callbackstuffs.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,7 @@ def text_to_url(event):
[Button.inline("Remove.bg API", data="abs_rmbg")],
[Button.inline("DEEP API", data="abs_dapi")],
[Button.inline("OpenAI API", data="abs_openapi")],
[Button.inline("🌀ʊʄ⊕ք🌀 API", data="abs_uapi")],
[Button.inline("OCR API", data="abs_oapi")],
[Button.inline("OpenAI API", data="abs_openapi")],
[Button.inline("🌀ʊʄ⊕ք🌀 API", data="abs_uapi")],
[Button.inline("BARD API", data="abs_bapi")],
[Button.inline("GOOGLE API", data="abs_gapi")],
Expand All @@ -201,12 +199,6 @@ def text_to_url(event):
"text": "Get Your Deep Api from deepai.org and send here.\n\n /cancel to cancel",
"back": "cbs_apiset",
},
"uapi": {
"var": "UFOPAPI",
"name": "UFoP API Key",
"text": "Contact 🌀ʊʄ⊕ք🌀 or Visit @PerthUnity_Bot Support Group\n\n /cancel to cancel",
"back": "cbs_apiset",
},
"openapi": {
"var": "OPENAI_API",
"name": "OPENAI API Key",
Expand All @@ -225,12 +217,6 @@ def text_to_url(event):
"text": "Contact 🌀ʊʄ⊕ք🌀 or Visit @PerthUnity_Bot Support Group\n\n /cancel to cancel",
"back": "cbs_apiset",
},
"openapi": {
"var": "OPENAI_API",
"name": "OPENAI API Key",
"text": "Visit openai.com for an OPENAI Api key!\n\n /cancel to cancel",
"back": "cbs_apiset",
},
"bapi": {
"var": "BARDAPI",
"name": "Bard AI Api Key",
Expand Down
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 356c959

Please sign in to comment.