T
T
tooohell2021-08-06 23:53:05
Python
tooohell, 2021-08-06 23:53:05

How to process 2 message from user vk_api python?

I'm making a bot in a VK conversation. how to make it so that a person can write a message in the chat and 2 of them were at the user's choice (like bets in a casino) I don’t know how to explain correctly, just an example I’ll say (you send {user ID} {amount}) i.e. 2 or 1 first messages were required , and the rest are 2 that the user enters.
I hope I explained correctly :\

UPD:
Another example, that is, before I just wrote /heads/tails and then the bet, but now I need to make it so that the bet is written (amount)

elif "решка" in msg.lower():
          db = sqlite3.connect('server9.db')
          db.row_factory = sqlite3.Row
          cursor = db.cursor()
          stavkat = msg.lower().split('вова решка ')[-1]
          cursor.execute(f"UPDATE users SET stavka={stavkat} WHERE user_id = {user_id}")
          flip = random.randint(1, 2)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question