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

Provides a set of functions to a Subreddit for emoji.

__getitem__(name: str) → praw.models.reddit.emoji.Emoji

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']
__init__(subreddit: Subreddit)

Create a SubredditEmoji instance.

Parameters:subreddit – The subreddit whose emoji are affected.
__iter__() → List[praw.models.reddit.emoji.Emoji]

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:
add(name: str, image_path: str)

Add an emoji to this subreddit.

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

The Emoji added.

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