soxogvv commited on
Commit
fe1a797
·
verified ·
1 Parent(s): 2f65926

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -29,7 +29,7 @@ a_raw.create_index([("link", 1)], unique=True)
29
  a_raw.create_index([("used", 1)])
30
  a_reacted.create_index([("link", 1)], unique=True)
31
  a_reacted.create_index([("used", 1)])
32
-
33
  # === Flask App ===
34
  app = Flask(__name__)
35
 
@@ -44,7 +44,7 @@ def status():
44
  return {"raw_links_left": raw, "reacted_links_left": reacted}, 200
45
 
46
  # === Telethon Bot Setup (Bot Mode) ===
47
- bot = TelegramClient("bot_session", API_ID, API_HASH).start(bot_token=BOT_TOKEN)
48
  user_context = {}
49
 
50
  # === Helper: Check if sender is owner ===
 
29
  a_raw.create_index([("used", 1)])
30
  a_reacted.create_index([("link", 1)], unique=True)
31
  a_reacted.create_index([("used", 1)])
32
+ from telethon.sessions import StringSession
33
  # === Flask App ===
34
  app = Flask(__name__)
35
 
 
44
  return {"raw_links_left": raw, "reacted_links_left": reacted}, 200
45
 
46
  # === Telethon Bot Setup (Bot Mode) ===
47
+ bot = TelegramClient(StringSession(), API_ID, API_HASH).start(bot_token=BOT_TOKEN)
48
  user_context = {}
49
 
50
  # === Helper: Check if sender is owner ===