Implement separate function to send random tweet

main
Hammy 4 years ago
parent d16c8b22d7
commit c16910706e

@ -1,5 +1,4 @@
import logging
import random
from bot.winston import Winston
@ -22,4 +21,4 @@ def event_handler(event, context):
for key, values in event.items():
Actions[key](values)
winston.send_tweet(random.choice(winston.potential_tweets))
winston.send_random_tweet()

@ -1,3 +1,5 @@
import random
import filetype as filetype
from twython import Twython
@ -24,6 +26,11 @@ class Winston:
self.bot.update_status(status=tweet_text)
def send_random_tweet(self):
"""Tweet something random from potential tweets"""
self.bot.update_status(status=random.choice(self.potential_tweets))
def tweet_with_media(self, text_and_media):
"""Tweet with media + optional text"""

Loading…
Cancel
Save