This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
So a bot I run has the following code in it:
mods = list(r.subreddit('alcohol').moderator())
comments = r.subreddit('alcohol').comments(limit=50)
for comment in comments:
if 'jerry' in comment.body.lower():
if comment.id not in open('comments.txt','r').read().split('\n'):
for trigger, rule in rule_triggers.items():
if trigger in comment.body.lower() and comment.id not in open('comments.txt','a ').read().split('\n') and comment.author in mods:
Now the important part is that last line. It checks for the trigger word (jerry) followed by the specific rule trigger word, checks to see if it's dealt with this comment already (in comments.txt), and if the person using the trigger is a moderator of the subreddit (the mods list).
What I'd like to do is take the mods list variable, and add to it (sort of like adding a trusted non-moderator user). Is there an easy way to add this extra username to the mods variable?
Subreddit
Post Details
- Posted
- 6 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/learnpython...