瀏覽代碼

Add custom shortnames

Danilo Bargen 5 年之前
父節點
當前提交
38b5e1c63d
共有 2 個文件被更改,包括 7 次插入1 次删除
  1. 2 0
      src/helpers/emoji.ts
  2. 5 1
      tools/twemoji/generate-shortname-mapping.py

+ 2 - 0
src/helpers/emoji.ts

@@ -2401,6 +2401,8 @@ const SHORTNAMES = {
     'sled': '🛷',
     'sleeping': '😴',
     'sleepy': '😪',
+    'slight_frown': '🙁',
+    'slight_smile': '🙂',
     'slot_machine': '🎰',
     'sloth': '🦥',
     'small_airplane': '🛩️',

+ 5 - 1
tools/twemoji/generate-shortname-mapping.py

@@ -13,8 +13,12 @@ for emoji_list in groups.values():
         for shortname in emoji['shortnames']:
             mappings.append((shortname.strip(':'), emoji['emoji']))
 
+# Custom shortcodes
+mappings.append(('slight_smile', '🙂'))
+mappings.append(('slight_frown', '🙁'))
+
 print('// Generated with tools/twemoji/generate-shortname-mapping.py')
-print('const shortnames = {')
+print('const SHORTNAMES = {')
 for (k, v) in sorted(mappings):
     print("    '{}': '{}',".format(k, v))
 print('};')