Another approach

This commit is contained in:
Lucy Joshua 2023-01-31 00:40:13 +02:00
parent 30c4ac5dc1
commit 92035e46c5
2 changed files with 3 additions and 1 deletions

View file

@ -3,5 +3,7 @@ version: "3.0"
services:
botyam:
build: .
environment:
- PYTHONUNBUFFERED=1
env_file:
- /etc/environment

View file

@ -11,7 +11,7 @@ def post_reply(conn, victim_bank, tweet, words, reply_text_bank, postcounter):
if any(word in tweet.data['text'] for word in words):
reply_text = reply_text_bank[random.randint(0, (len(reply_text_bank)-1))]
# Post reply
if tweet.data['author_id'] in victim_bank.author_id:
if tweet.data['author_id'] in victim_bank['author_id']:
reply_text = victim_bank['reply'][random.randint(0,2)] + "\n" + reply_text
res = conn.api.create_tweet(
text=reply_text,