You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
645 B
Python
27 lines
645 B
Python
4 years ago
|
import random
|
||
|
from twython import Twython
|
||
|
|
||
|
from twitter.bot.aws_secrets import get_secret
|
||
4 years ago
|
from twitter.bot.commands import send_tweet
|
||
|
|
||
|
|
||
|
class Winston:
|
||
|
bot = Twython(
|
||
|
get_secret("CONSUMER_KEY"),
|
||
|
get_secret("CONSUMER_SECRET"),
|
||
|
get_secret("ACCESS_TOKEN_KEY"),
|
||
|
get_secret("ACCESS_TOKEN_SECRET")
|
||
|
)
|
||
|
|
||
|
@staticmethod
|
||
|
def potential_tweets():
|
||
|
return [
|
||
|
"Hello! I'm Winston From Overwatch!",
|
||
|
"Winston! From! Overwatch!",
|
||
|
"Winston? From Overwatch?"
|
||
|
]
|
||
|
|
||
|
@staticmethod
|
||
|
def request_handler():
|
||
4 years ago
|
send_tweet(random.choice(Winston.potential_tweets()))
|