class MyBot(api.SimpleBot):
def __init__(self):
self.vars = {}
def OnMessage(self, sender, text):
if sender not in self.vars.keys(): #Первое сообщение от юзера - инит его переменных
self.vars[sender] = {"state":"init","order": None}
if "/order" in text:
self.vars[sender]["order"] = text.replace("/order","").strip()
self.vars[sender]["state"] = "payment"
self.Say(sender,"You order accepted! Make payment!")
if "/paycode" in text and self.vars[sender]["state"]=="payment":
if self.ProcessPayment(text.replace("/paycode","").strip()):
self.vars[sender]["state"] = "ready"
self.Say(sender,"You payment sesefull!")
else:
self.Say(sender,"Worng CODE!")
def Say(self, target, text):
pass
def ProcessPayment(self, code):
pass
Фамилия Имя* <input name="namef" <?php if ($user!='') {echo "disabled";} ?> value="<?php if ($user!='') {echo $user;} ?>" > <br>
from adb.client import Client as AdbClient
client = AdbClient(host="127.0.0.1", port=5037)
device = client.device("emulator-5554")#тут имя устройства которое при подключении к wifi видно
result = device.screencap()
with open("screen.png", "wb") as fp:
fp.write(result)