Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- token = ''
- url = 'https://api.telegram.org/bot{}/'.format(token)
- def send_message(chat_id, text, reply_markup=None):
- URL = url + \
- "sendMessage?text={}&chat_id={}&parse_mode=Markdown".format(
- text, chat_id)
- if reply_markup:
- URL += '&reply_markup={}'.format(reply_markup)
- res = requests.get(URL)
- while res.status_code != 200:
- res = requests.get(URL)
Advertisement
Add Comment
Please, Sign In to add comment