{ message_id: 1326,
from:
{ id: 346580048,
is_bot: false,
first_name: 'Andrey',
last_name: 'Radkevich',
username: 'andreyradkevich',
language_code: 'uk-UA' },
chat:
{ id: 346580048,
first_name: 'Andrey',
last_name: 'Radkevich',
username: 'andreyradkevich',
type: 'private' },
date: 1520632810,
text: '' }
如何将所有这些表情符号从1个电报信息中分开...我需要获得所有这些表情符号,并在此示例中使用每个表情符号制作4个按钮,您可以在字段文本中看到..
答案 0 :(得分:0)
let GraphemeSplitter = require('grapheme-splitter');
// two-char emojis and six-char combined emoji
splitter.splitGraphemes("️"); // returns ["","","","","","️"]
https://github.com/orling/grapheme-splitter - 你可以在这里找到答案