Spaces:
Runtime error
Runtime error
File size: 632 Bytes
1150b5c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
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))
|