Replace emoji markup with corresponding unicode characters. Args: text (str): A string with emojis codes, e.g. "Hello :smiley:!" Returns: str: A string with emoji codes replaces with actual emoji.
(cls, text: str)
| 51 | |
| 52 | @classmethod |
| 53 | def replace(cls, text: str) -> str: |
| 54 | """Replace emoji markup with corresponding unicode characters. |
| 55 | |
| 56 | Args: |
| 57 | text (str): A string with emojis codes, e.g. "Hello :smiley:!" |
| 58 | |
| 59 | Returns: |
| 60 | str: A string with emoji codes replaces with actual emoji. |
| 61 | """ |
| 62 | return _emoji_replace(text) |
| 63 | |
| 64 | def __repr__(self) -> str: |
| 65 | return f"<emoji {self.name!r}>" |