🏷️ AI Girlfriend Bot Code For Telebot Creator (TBC)
🔰Command: *
📛Code:
try:
text_in = str(msg).strip()
if text_in != "" and not text_in.startswith("/"):
chat_id = message.chat.id
user_msg_id = message.message_id
sent_msg = bot.sendMessage(
"💭 <i>Thinking...</i>",
parse_mode="html",
reply_to_message_id=user_msg_id
)
wait_msg_id = None
try:
wait_msg_id = sent_msg.message_id
except:
try:
wait_msg_id = sent_msg["result"]["message_id"]
except:
try:
wait_msg_id = sent_msg["message_id"]
except:
wait_msg_id = None
safe_q = text_in.replace("%", "%25")
safe_q = safe_q.replace(" ", "%20")
safe_q = safe_q.replace("\n", "%0A")
safe_q = safe_q.replace("&", "%26")
safe_q = safe_q.replace("?", "%3F")
safe_q = safe_q.replace("=", "%3D")
safe_q = safe_q.replace("#", "%23")
safe_q = safe_q.replace("+", "%2B")
api_url = "
https://fariha-x-tynx.vercel.app/gem?text=" + safe_q
res = HTTP.get(api_url)
raw_str = ""
try:
if res.text:
raw_str = str(res.text)
else:
raw_str = str(res)
except:
raw_str = str(res)
reply_text = ""
try:
val = res.json()["reply"]
if val:
reply_text = str(val)
except:
try:
val = res["reply"]
if val:
reply_text = str(val)
except:
pass
if reply_text == "":
for marker in ['"reply":"', '"reply": "', "'reply':'", "'reply': '"]:
if reply_text == "" and marker in raw_str:
try:
q_char = marker[-1]
after_reply = raw_str.split(marker…
Read in full →