Last active
November 14, 2023 06:55
-
-
Save manhay212/987c32b634927a4388ad7aba6b7bcbbf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
telegram_bot_sendtext.py