私は誰かが文字列を言い当てるたびに数字を増やすボットを作ろうとしています。これまでのところ、私はそれを1回だけ増やすことができ、他のすべての応答は同じ数にとどまります。 2017年に宣言されていますが、文字列が見つかると2018年に返信されます。私は、私が行方不明の小さな何かを知っているが、私はそれを把握できません。redditの数字を増やすpython bot reply
for comment in r.subreddit('test').comments(limit = 500):
mentions = 2017
if "string" in comment.body and comment.id not in comments_replied_to and comment.author != r.user.me():
mentions +=1
print ("string found!") and comment.id
comment.reply(" delayed until year" + str(mentions))
print("replied to comment")
ああ、私はそれを見逃しています。ありがとう、それはそれを解決した – bills
それはすべての場合は、答えの1つを受け入れることがあります。 – SwiftsNamesake