简体   繁体   中英

How to send emojis from bot to user in Microsoft teams

I created a bot in the MS bot framework and linked it to the Teams channel. How to send emoji from bot to users?

Teams support UTF-16, I have tried await stepContext.Context.SendActivityAsync("\U0001F600"); to send the emoji as a response from bot to the user, but it is not in the format of the emoji which is available in teams.

stepContext.Context.SendActivityAsync("\U0001F600"); it shows when I actually want is (smile) from teams which is slightly bigger and animated.

The emoji in teams are stored in the form of URL: " https://statics.teams.microsoft.com/evergreen-assets/skype/v2/smile/50.png "

If you are using windows and Visual Studio, you can simply press " window key +. " and you will get a window with emojis that you can simply add to your text.

在此处输入图像描述

在此处输入图像描述 Or you can also copy any emoji and paste it in your text. Check Emojipedia

All of the emojis have their textual code. For example: :):P:D When you want to send a smiley append “:)” into the text and it will automatically render it as smiley in the chat box.

Also for every single recipient device, code could be rendered in a different manner, you can check the complete list here:

https://www.unicode.org/emoji/charts-beta/full-emoji-list.html#1f642

I would suggest you to use 1f642 code for slightly smiling face.

See if it helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM