From dce9ff02ddf6df22357cc0e3dda6b9b557fc0e2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20S=C3=A1=20Couto?= Date: Thu, 21 Mar 2019 12:45:22 +0100 Subject: [PATCH] just displays my dms and not replies --- dms.py | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/dms.py b/dms.py index bb26129..f6121b9 100644 --- a/dms.py +++ b/dms.py @@ -36,13 +36,18 @@ with open('token.txt', 'r') as token: for status in my_statuses: if status['visibility'] == 'direct': # filter only direct msgs - pprint(status) - # pprint(status['mentions']) - # print(status['content']) - # print(status['id']) - # print(status['created_at']) - # - # text_file.write("Avatar:" + "\n" + str(bot) + "\n" + "\n") - # text_file.write("Content:" + "\n" + str(content) + "\n" + "\n" + "\n") - - #text_file.write("Impossible to print image"+"\n"+"\n") + + avatar = (status['account']['avatar']) + name = (status['account']['display_name']) + bot = (status['account']['bot']) + content = (status['content']) + + pprint("Avatar:" + "\n" + str(avatar) + "\n" + "\n") + pprint("Name:" + "\n" + str(name) + "\n" + "\n") + pprint("Bot:" + "\n" + str(bot) + "\n" + "\n") + pprint("Content:" + "\n" + str(content) + "\n" + "\n") + + text_file.write("Avatar:" + "\n" + str(avatar) + "\n" + "\n") + text_file.write("Name:" + "\n" + str(name) + "\n" + "\n") + text_file.write("Bot:" + "\n" + str(bot) + "\n" + "\n") + text_file.write("Content:" + "\n" + str(content) + "\n" + "\n" + "\n")