Browse Source

pepito hotfix

master
Angerstoner 6 years ago
parent
commit
695a727b46
  1. 5
      schneiderbot_twitter.py

5
schneiderbot_twitter.py

@ -34,7 +34,7 @@ def check_pepito_and_post_auto(bot, update):
api = get_twitter_instance()
current_status = api.GetUserTimeline(pepito_id)[0]
global last_status
if last_status != current_status:
if last_status == None or last_status.AsDict()['id'] != current_status.AsDict()['id']:
for group_id in pepito_groups:
bot.send_message(chat_id=group_id, text=current_status.AsDict()['text'])
last_status = current_status
@ -44,7 +44,8 @@ def check_pepito_and_post_manually(bot, update):
api = get_twitter_instance()
current_status = api.GetUserTimeline(pepito_id)[0]
global last_status
if last_status != current_status:
if last_status.AsDict()['id'] != current_status.AsDict()['id']:
for group_id in pepito_groups:
bot.send_message(chat_id=group_id, text=current_status.AsDict()['text'])
last_status = current_status

Loading…
Cancel
Save