我試圖讓每次有人提到一個字符串時都會增加一個數字的bot。到目前爲止,我只能讓它增加一次,而其他答覆都保持在同一個數字。它在2017年宣佈,但只會在2018年找到字符串時回覆。我知道它很小但我不知道,但我不知道。reddit python bot中增加的數字回覆
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
如果只是這樣,你可能想要接受其中一個答案。 – SwiftsNamesake