From 41c43ab0455d5bf92198121ee0242398327a96ed Mon Sep 17 00:00:00 2001 From: oloturia Date: Sat, 28 Mar 2020 02:07:41 +0100 Subject: [PATCH] now it writes direct messages --- buonanotte.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buonanotte.py b/buonanotte.py index df42dd1..504ef7a 100644 --- a/buonanotte.py +++ b/buonanotte.py @@ -51,7 +51,7 @@ class goodListener(StreamListener): row = [datesleep,account,lang] writer = csv.writer(file) writer.writerow(row) - mastodon.toot(greet+account+reminder+result) + mastodon.status_post(greet+accout+reminder+result,visibility="direct") except AttributeError: return @@ -63,7 +63,7 @@ class goodListener(StreamListener): if (parser.parse(row[0]) < datetime.datetime.now()): greet = languages[row[2]][0] goodnight = languages[row[2]][2] - mastodon.toot(greet+row[1]+goodnight) + mastodon.status_post(greet+row[1]+goodnight,visibility="direct") sentToBed.append(line) if (len(sentToBed) > 0): with open("schedule.csv","r") as file: