Answer the question
In order to leave comments, you need to log in
How to make the bot (Vkbottle) send a message when a new user is added to the conversation?
I'm learning python by clicking, writing a simple bot using the VKBottle library. I want to implement such a function in which the bot will greet people who join the chat, please tell me how best to implement this.
Answer the question
In order to leave comments, you need to log in
from vkbottle.bot import Bot, Message, rules
bot = Bot(token="")
@bot.on.chat_message((rules.ChatActionRule("chat_invite_user"), rules.ChatActionRule("chat_invite_user_by_link")))
async def user_joined(message: Message) -> None:
await message.answer("Приветствуем в нашем чате")
bot.run_forever()
how best to implement it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question