med-hackaathon / telegram_bot.py
natexcvi
Initial commit
1150b5c unverified
import asyncio
import os
import random
import telegram
from dotenv import load_dotenv
load_dotenv()
async def send_message_to_user(chat_id: str, message: str):
bot = telegram.Bot(token=os.getenv("TELEGRAM_BOT_TOKEN", ""))
await bot.send_message(chat_id=chat_id, text=message)
checkup_messages = [
"Hey there, how are you feeling today?",
"Hello, how are you doing today?",
"Hi, how are you feeling today?",
"Hey, what's up?",
"Hi, how are you doing?",
]
if __name__ == "__main__":
msg = random.choice(checkup_messages)
asyncio.run(send_message_to_user(chat_id="1773171761", message=msg))