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.
3
Update flair text and add emojis praw
Post Flair (click to view more posts with a particular flair)
Post Body
I have a function that creates a simple flair with text, now I need to access that flair to modify it. I can't seem to find what is needed to do the following.
1- need to access a flair by flair id
2- remove the flair text - mod/tools/content/post Flair/EDIT
3- add an emoji by name - mod/tools/content/post Flair/EDIT/Flair text
4- save changes
this is what I currently have
def update_flair(subreddit_name, flair_id):
cli = get_reddit_cli()
subreddit = cli.subreddit(subreddit_name)
flairs = list(subreddit.flair(limit=None))
flair = None
for flair_obj in flairs:
if flair_obj["flair_id"] == flair_id:
flair = flair_obj
break
if flair is None:
emoji_names = [":cb1:", ":cb1:", ":cb1:"]
flair["text"] = " ".join(emoji_names)
subreddit.flair.update(flair)
Any help is greatly appreciated.
Author
Account Strength
100%
Account Age
3 years
Verified Email
Yes
Verified Flair
No
Total Karma
12,468
Link Karma
8,164
Comment Karma
1,681
Profile updated: 6 days ago
Subreddit
Post Details
We try to extract some basic information from the post title. This is not
always successful or accurate, please use your best judgement and compare
these values to the post title and body for confirmation.
- Posted
- 1 year ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/redditdev/c...