Commit
·
4a4cb82
1
Parent(s):
c52c107
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,13 +25,14 @@ api_hash=os.environ['apiHash']
|
|
| 25 |
phone=os.environ['phone']
|
| 26 |
username=os.environ['username']
|
| 27 |
|
|
|
|
| 28 |
|
| 29 |
|
| 30 |
# Dictionary to track the times when senders were last replied to
|
| 31 |
reply_times = {}
|
| 32 |
|
| 33 |
async def main():
|
| 34 |
-
async with TelegramClient(
|
| 35 |
@client.on(events.NewMessage())
|
| 36 |
async def my_event_handler(event):
|
| 37 |
sender = await event.get_sender()
|
|
|
|
| 25 |
phone=os.environ['phone']
|
| 26 |
username=os.environ['username']
|
| 27 |
|
| 28 |
+
serssionFile=os.environ['sessionUrlFile']
|
| 29 |
|
| 30 |
|
| 31 |
# Dictionary to track the times when senders were last replied to
|
| 32 |
reply_times = {}
|
| 33 |
|
| 34 |
async def main():
|
| 35 |
+
async with TelegramClient(serssionFile, api_id, api_hash) as client:
|
| 36 |
@client.on(events.NewMessage())
|
| 37 |
async def my_event_handler(event):
|
| 38 |
sender = await event.get_sender()
|