Answer the question
In order to leave comments, you need to log in
How to send a message via vkwave by user id?
How to send a message via vkwave by user id?
There is a code:
import config as c
TOKEN = c.token
GROUP_ID = 209652072
from vkwave.bots import SimpleLongPollBot
bot = SimpleLongPollBot(tokens=TOKEN, group_id=GROUP_ID)
@bot.message_handler(bot.text_contains_filter("Начать"))
async def handle(event: bot.SimpleBotEvent) -> str:
id_user = event.user_id
user_data = (await event.api_ctx.users.get(user_ids=event.object.object.message.peer_id)).response[0]
return f"Привет {user_data.first_name}"
print('Бот запущен!')
bot.run_forever()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question