diff --git a/hotdog/command/prost.py b/hotdog/command/prost.py index 4204f22..13d0200 100644 --- a/hotdog/command/prost.py +++ b/hotdog/command/prost.py @@ -8,28 +8,31 @@ def init(bot): bot.on_message(handle) +vs16 = "\ufe0f" # see https://en.wikipedia.org/wiki/Variation_Selectors_%28Unicode_block%29 emojis = { - "☕️", - "🍵", - "🍶", - "🍷", - "🍸", - "🍹", - "🍺", - "🍻", - "🍼", - "🍾", - "🥂", - "🥃", - "🥛", - "🥤", - "🧃", - "🧉", + e.rstrip(vs16) + for e in { + "☕", + "🍵", + "🍶", + "🍷", + "🍸", + "🍹", + "🍺", + "🍻", + "🍼", + "🍾", + "🥂", + "🥃", + "🥛", + "🥤", + "🧃", + "🧉", + } } async def handle(message: Message): - vs16 = "\ufe0f" # see https://en.wikipedia.org/wiki/Variation_Selectors_%28Unicode_block%29 is_drinkmoji = message.text.rstrip(vs16) in emojis if not (message.tokens.str(0).startswith("PR!") or is_drinkmoji): return