Node-telegram-bot-api: Reemplace :emoji: codes as theirs unicode representation

Created on 13 Oct 2015  路  4Comments  路  Source: yagop/node-telegram-bot-api

Hi,
i try to use emoticon/emoji in sendMessage i try ":name:" format and this format: http://pythonhosted.org/python-telegram-bot/telegram.emoji.html
But not work, can you help me? We need to develop some components?

Thanks,
J

enhancement hacktoberfest

Most helpful comment

I solved using:

$ npm install node-emoji
var emoji = require('node-emoji').emoji;
bot.sendMessage(chatId, 'HI! ' + emoji.heart);

All 4 comments

There is no such feature on this module, but I think you can use emoji as its UTF8 code. Just copy and paste the emoji. I also think you can use the UTF8 code like:

console.log("\u{1F604}");

http://apps.timwhitlock.info/emoji/tables/unicode

I solved using:

$ npm install node-emoji
var emoji = require('node-emoji').emoji;
bot.sendMessage(chatId, 'HI! ' + emoji.heart);

@jacopocappelli1989 This library is mostly focused on interacting with the Bot API i.e. providing low-level access to the API. This seems like a high-level feature that is better suited in a high-level library, or in your application code as @lenny76 suggests above.

Side note: you may be interested with tgfancy, as soon as I add emoji support (issue https://github.com/GochoMugo/tgfancy/issues/3).

lenny76 - it work ) thanks/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Lemmmy picture Lemmmy  路  3Comments

alikhil picture alikhil  路  3Comments

saeedhei picture saeedhei  路  4Comments

Dohoon-Kim picture Dohoon-Kim  路  3Comments

lenny76 picture lenny76  路  3Comments