diff options
author | 2022-07-12 18:58:49 -0400 | |
---|---|---|
committer | 2022-07-12 18:58:49 -0400 | |
commit | 3252f4115554c3de40e230936f5701ec86f76149 (patch) | |
tree | c7cbf3e4dac4bd55ca3d2904f74d461f38a5e948 | |
parent | Added external emoji replacement filter (diff) |
Updated docstrings
- Added docstring to `Emoji` class.
- Added period to end of `_ext_emoji_replace` docstring.
-rw-r--r-- | bot/exts/fun/uwu.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bot/exts/fun/uwu.py b/bot/exts/fun/uwu.py index 053e64cd..c045a62e 100644 --- a/bot/exts/fun/uwu.py +++ b/bot/exts/fun/uwu.py @@ -62,6 +62,8 @@ RE_EMOJI = re.compile(r"<(a?)?:(\w+):(\d{18})>?") @dataclass(frozen=True, eq=True) class Emoji: + """Data class for an Emoji.""" + name: str uid: int animated: bool = False @@ -125,7 +127,7 @@ class Uwu(Cog): return match_string def _ext_emoji_replace(self, input_string: str) -> str: - """Replaces external emojis with emoticons""" + """Replaces external emojis with emoticons.""" groups = RE_EMOJI.findall(input_string) emojis = {Emoji.from_match(match) for match in groups} # Replace with random emoticon if unable to display |