This commit is contained in:
Lucy Joshua 2023-01-31 10:45:16 +02:00 committed by GitHub
parent 4d3b14b210
commit a58cec4ebd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,9 +17,10 @@ def post_reply(conn, victim_bank, tweet, words, reply_text_bank, postcounter):
text=reply_text, text=reply_text,
in_reply_to_tweet_id=tweet["id"] in_reply_to_tweet_id=tweet["id"]
) )
postcounter = postcounter + 1
response_data = f"RESPONDING: {res.data['text']}" response_data = f"RESPONDING: {res.data['text']}"
print(response_data) print(response_data)
return (postcounter + 1) return postcounter
class BotYamPoster(tweepy.StreamingClient): class BotYamPoster(tweepy.StreamingClient):
@ -27,7 +28,7 @@ class BotYamPoster(tweepy.StreamingClient):
def on_tweet(self, tweet): def on_tweet(self, tweet):
# Make it easy on Yashar # Make it easy on Yashar
postcounter = 0 postcounter = int(0)
if (not "@FromBotYam" in tweet.data['text'] and random.randint(0,3) != 0): if (not "@FromBotYam" in tweet.data['text'] and random.randint(0,3) != 0):
return return