Skip to content

Instantly share code, notes, and snippets.

@manhay212
Last active November 14, 2023 06:55
Show Gist options
  • Save manhay212/987c32b634927a4388ad7aba6b7bcbbf to your computer and use it in GitHub Desktop.
Save manhay212/987c32b634927a4388ad7aba6b7bcbbf to your computer and use it in GitHub Desktop.
import requests
def telegram_bot_sendtext(bot_message):
bot_token = ''
bot_chatID = ''
send_text = 'https://api.telegram.org/bot' + bot_token + '/sendMessage?chat_id=' + bot_chatID + '&parse_mode=Markdown&text=' + bot_message
response = requests.get(send_text)
return response.json()
test = telegram_bot_sendtext("Testing Telegram bot")
print(test)
@ukenpachi
Copy link

am trying to sent a message with symbols the following unicode works \U0001F433 however none of the unicode for flags and arrows such as
U0001F1F9,U0002B070 and U0002B077 does not work. I have also tried 🇬🇧 does not work also please advise

@Chotasher
Copy link

telegram_bot_sendtext.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment