1
0
Fork 0
mirror of https://gitlab.com/oloturia/buonanotte.git synced 2025-01-08 22:47:20 +01:00

now it writes direct messages

This commit is contained in:
oloturia 2020-03-28 02:07:41 +01:00
parent 58cc0826ef
commit 41c43ab045

View file

@ -51,7 +51,7 @@ class goodListener(StreamListener):
row = [datesleep,account,lang] row = [datesleep,account,lang]
writer = csv.writer(file) writer = csv.writer(file)
writer.writerow(row) writer.writerow(row)
mastodon.toot(greet+account+reminder+result) mastodon.status_post(greet+accout+reminder+result,visibility="direct")
except AttributeError: except AttributeError:
return return
@ -63,7 +63,7 @@ class goodListener(StreamListener):
if (parser.parse(row[0]) < datetime.datetime.now()): if (parser.parse(row[0]) < datetime.datetime.now()):
greet = languages[row[2]][0] greet = languages[row[2]][0]
goodnight = languages[row[2]][2] goodnight = languages[row[2]][2]
mastodon.toot(greet+row[1]+goodnight) mastodon.status_post(greet+row[1]+goodnight,visibility="direct")
sentToBed.append(line) sentToBed.append(line)
if (len(sentToBed) > 0): if (len(sentToBed) > 0):
with open("schedule.csv","r") as file: with open("schedule.csv","r") as file: