Browse Source

chatbot

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

14
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:
@ -12,4 +14,14 @@ testContacts = []
testContacts.append('e.neug@icloud.com') 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