I’m dealing with a small project, I decided to add emoji to make the visual a little better, but I couldn’t send it. I tried Unicodes like "U000203C" or even tried to copy the emoji and past it but still can’t do it. Is there any way that I can send emoji?
Unicode
exchange_msg = "TRY TO USD: "+ USDTORTY, "PERCANTAGE: " + USDTORTYPERCENTAGE + u'U000203C'
update.message.reply_text(exchange_msg)
Copy-Paste
exchange_msg = "TRY TO USD: "+ USDTORTY, "PERCANTAGE: " + USDTORTYPERCENTAGE + u'🚨'
update.message.reply_text(exchange_msg)
The outputs of the codes I tried are as follows below.
["TRY TO USD: 7.8645", "PERCANTAGE: -0.0151 (-0.19%)ud83dudea8"]
3
Answers
The reply message is a tuple
You can easily use emoij in text messages as long a they are part of a String.
You could change your code to use a single string as response (which is a good way to map a reply) or alternatively access directly the tuple values
I have a running bot and I use a lot of emojis. I use https://www.iemoji.com/ to find the Python Src to the emoji I want to use, then I code.
This is my way to do it:
There are some ways to show your emojis in python.
By emoji name (You can find your names in this unicode.org)
By emoji unicode (It should be 8 characters, hence, put some zeros after U)