K
K
KarToSHKa_Ex2018-09-13 07:46:03
In contact with
KarToSHKa_Ex, 2018-09-13 07:46:03

How to send messages every day vk api?

Wrote a bot for VK. But now I need help with vk.api. Wrote in pythonanywhere. vk api has been updated to 5.8 and now has a burning desire to make it so that it answers in a conversation. If anyone knows, I'll be glad. I still don’t know how to add so that the bot writes a message to all subscribers every day at a certain time
def create_answer(data, token):
load_modules()
peer_id = data['peer_id']
message, attachment = get_answer(data['text'].lower( ))
vkapi.send_message(peer_id, token, message, attachment)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Radjah, 2018-09-13
@Radjah

Run a script by cron, for example. or systemd.timer.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question