i made sure the user sent a message to the bot and i made sure the username is correct still when the user makes an appointment the bot doesnt send a message..
def send_telegram_message(chat_id, message):
url = f”https://api.telegram.org/bot{TELEGRAM_BOT_TOKEN}/sendMessage”
payload = {
‘chat_id’: chat_id,
‘text’: message
}
response = requests.post(url, data=payload)
logging.debug(f’Sending message to {chat_id}: {response.json()}’)
return response.json()
…………………………………………………………………………………….
Amir Okbi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.