Closed mhonarvar18 closed 6 years ago
The bot has to be in the group in order to be able to send a message. You will also need the chatid of the group. After that you can just send a message to the specific chatid.
I suggest you make a start function which saves the chatid in a database. after that you can do whatever you want.
@eMaurits thanks for your attention. but the point is here. how can I send message to user of bot, every day?? is telegram run my bot's code every day by himself??!
Ah, you didnt specify that in your first question.. Telegram does not run your code for you. It will send a notification to a url everytime someone sends a message in a chat where your bot is. If you want to send a message each day you will have to create something like a cron job where it runs your code on your server each day.
@eMaurits Cron is a very good suggest. Thank you so much. :))
hi everybody. I wanna send a message automatically to users and group chats without user interaction can you help me?