def onMessageRec(uid,txt): if("На фото найдены" in txt):return txt=txt.replace("<br>","\n").replace("&","&").replace(">",">").replace("<","<") d=DialogManager.getDialogById("_vk"+str(uid),sendfunction=sendf,typefunction=sendTypingStatus) isPriv=not (str(uid).count("2000000")>0) if(not isPriv): isPriv=(txt.count("Курису")+txt.count("Макис")+txt.lower().count("ассистент")+txt.count("Амадей")+txt.count("Амадеус")+txt.count("Куристина")>0) print(isPriv) d.getAnswer(txt.replace("<br>",""),"",isPrivate=isPriv)
def onMessageRec(uid, txt): d = DialogManager.getDialogById("_vk" + str(uid), sendfunction=sendf, typefunction=sendTypingStatus) d.pubScore = 0.84 isPriv = not (str(uid).count("2000000") > 0) if (not isPriv): isPriv = (txt.count("Курису") + txt.count("Макис") + txt.lower().count("ассистент") + txt.count("Амадей") + txt.count("Амадеус") + txt.count("Куристина") > 0) print(isPriv) d.getAnswer(txt.replace("<br>", ""), "", isPrivate=isPriv)
"Макисе", "").replace("Ассистент", "").replace("Асистент", "").replace("Амадеус", "") if (txt.count("Kurisu") + txt.count("Makise") + txt.count("Assistent") + txt.count("Amadeus") > 0): isPrivate = True txt = txt.replace("Kurisu", "").replace("Makise", "").replace( "Assistent", "").replace("Amadeus", "") if (txt.replace(" ", "").replace("ё", "е").replace( "\n", "").lower().count("еще") == 1 and len(txt) < 6): txt = lastrec else: lastrec = txt dm.getDialogById("_tg" + str(peer), sendfunction=sendf, typefunction=sendTypingStatus).getAnswer( txt, "", isPrivate=isPrivate) except Exception as e: print(e) if (random.random() < 0.000545): try: if (random.random() > 0.6): random.choice(dm.dialogs).getAnswer("го цитату", isVoice=False, isPrivate=True) else: sendSticker(random.choice(dm.dialogids)) except Exception as e: print(e) time.sleep(2)