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
|
||||
|
||||
def sendSelfTelegram(text):
|
||||
def sendSelfTelegram(message):
|
||||
print(f"sending telegram message to myself")
|
||||
# get your api_id, api_hash, token
|
||||
# from telegram as described above
|
||||
@@ -53,7 +53,7 @@ def sendSelfTelegram(text):
|
||||
client.sign_in(phone, input('Enter the code: '))
|
||||
try:
|
||||
schlingelId=5070349790
|
||||
client.send_message(schlingelId, "test message", parse_mode='html')
|
||||
client.send_message(schlingelId, message, parse_mode='html')
|
||||
except Exception as e:
|
||||
# there may be many error coming in while like peer
|
||||
# error, wwrong access_hash, flood_error, etc
|
||||
@@ -74,7 +74,7 @@ def sendMail(topic,toAddr):
|
||||
https://deadswitch.kawomi.com/api/v1?topic={topic}
|
||||
|
||||
"""
|
||||
sendSelfTelegram(message)
|
||||
#sendSelfTelegram(message)
|
||||
server.sendmail(sender_email, receiver_email, message)
|
||||
|
||||
def expiryCheck():
|
||||
|
||||
Reference in New Issue
Block a user