Browse Source

chatbot

master
Eddie 2 years ago
parent
commit
f7eb39711f
  1. 12
      autoResponder.py

12
autoResponder.py

@ -1,5 +1,7 @@
import codecs import codecs
from mail_util import checkFor_unkownContacts, sendEmails from mail_util import checkFor_unkownContacts, sendEmails
from chatbot import sendMessage
from config import today, yesterday
def getResponseText(): def getResponseText():
with open('responses/bookingResponse.txt', 'r') as file: with open('responses/bookingResponse.txt', 'r') as file:
@ -13,3 +15,13 @@ testContacts.append('e.neug@icloud.com')
responseText = getResponseText() responseText = getResponseText()
print(responseText) print(responseText)
sendEmails(responseText, testContacts) sendEmails(responseText, testContacts)
chatTextIntro = f"Hey! ich wurde Heute ({today}) ausgeführt und suche für Gestern({yesterday}) nach neuen Kontakten"
chatTextAmmount = f"Ich habe {len(testContacts)} neue Kontakte gefunden"
chatTextNone = f"Ich habe keine neuen Kontakte gefunden"
sendMessage(chatTextIntro)
if len(testContacts) > 0:
sendMessage(chatTextAmmount)
else:
sendMessage(chatTextNone)

Loading…
Cancel
Save