SubredditEmoji

class praw.models.reddit.emoji.SubredditEmoji(subreddit)

Provides a set of functions to a Subreddit for emoji.

__getitem__(name)

Lazily return the Emoji for the subreddit named name.

Parameters:name – The name of the emoji

This method is to be used to fetch a specific emoji url, like so:

emoji = reddit.subreddit('praw_test').emoji['test']
print(emoji)
__init__(subreddit)

Create a SubredditEmoji instance.

Parameters:subreddit – The subreddit whose emoji are affected.
__iter__()

Return a list of Emoji for the subreddit.

This method is to be used to discover all emoji for a subreddit:

for emoji in reddit.subreddit('praw_test').emoji:
    print(emoji)
add(name, image_path)

Add an emoji to this subreddit.

Parameters:
  • name – The name of the emoji
  • image_path – A path to a jpeg or png image.
Returns:

The Emoji added.

To add 'test' to the subreddit 'praw_test' try:

reddit.subreddit('praw_test').emoji.add('test','test.png')