Source code for sleamdge.util

import steam

[docs] EMOJIS = dict[str, str]( [ ("steamthumbsup", "👍"), ("steamthumbsdown", "👎"), ("steambored", "🥱"), ("steamfacepalm", "🤦"), ("steamhappy", "😄"), ("steammocking", "😝"), ("steamsalty", "🧂"), ("steamsad", "😔"), ("steamthis", "⬆"), ] )
[docs] EMOJIS_INVERSE = {v: k for k, v in EMOJIS.items()}
[docs] EMOJIS_SET = set(EMOJIS.values())
[docs] def emojize(emoticon: steam.Emoticon) -> str: return EMOJIS.get(emoticon.name, "❔")
[docs] def demojize(emoji: str) -> str: return EMOJIS_INVERSE[emoji]