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
629 B
Python
27 lines
629 B
Python
4 years ago
|
import random
|
||
|
from twython import Twython
|
||
|
|
||
4 years ago
|
from bot.aws_secrets import get_secret
|
||
|
from bot.commands import send_tweet
|
||
4 years ago
|
|
||
|
|
||
|
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()))
|