mirror of
https://gitlab.com/oloturia/buonanotte.git
synced 2025-01-06 21:47:20 +01:00
now it writes direct messages
This commit is contained in:
parent
58cc0826ef
commit
41c43ab045
1 changed files with 2 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue