get rid of telegram sending - not compatible with threading
This commit is contained in:
6
api1.py
6
api1.py
@@ -26,7 +26,7 @@ class Config(object):
|
|||||||
|
|
||||||
SCHEDULER_API_ENABLED = True
|
SCHEDULER_API_ENABLED = True
|
||||||
|
|
||||||
def sendSelfTelegram(text):
|
def sendSelfTelegram(message):
|
||||||
print(f"sending telegram message to myself")
|
print(f"sending telegram message to myself")
|
||||||
# get your api_id, api_hash, token
|
# get your api_id, api_hash, token
|
||||||
# from telegram as described above
|
# from telegram as described above
|
||||||
@@ -53,7 +53,7 @@ def sendSelfTelegram(text):
|
|||||||
client.sign_in(phone, input('Enter the code: '))
|
client.sign_in(phone, input('Enter the code: '))
|
||||||
try:
|
try:
|
||||||
schlingelId=5070349790
|
schlingelId=5070349790
|
||||||
client.send_message(schlingelId, "test message", parse_mode='html')
|
client.send_message(schlingelId, message, parse_mode='html')
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# there may be many error coming in while like peer
|
# there may be many error coming in while like peer
|
||||||
# error, wwrong access_hash, flood_error, etc
|
# error, wwrong access_hash, flood_error, etc
|
||||||
@@ -74,7 +74,7 @@ def sendMail(topic,toAddr):
|
|||||||
https://deadswitch.kawomi.com/api/v1?topic={topic}
|
https://deadswitch.kawomi.com/api/v1?topic={topic}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
sendSelfTelegram(message)
|
#sendSelfTelegram(message)
|
||||||
server.sendmail(sender_email, receiver_email, message)
|
server.sendmail(sender_email, receiver_email, message)
|
||||||
|
|
||||||
def expiryCheck():
|
def expiryCheck():
|
||||||
|
|||||||
BIN
session.session
BIN
session.session
Binary file not shown.
Reference in New Issue
Block a user