def start(client, message): client.send_message( chat_id=message.chat.id, text= f"`Hi` **{message.from_user.first_name}**\n `Enter the number to search...`" ) check_status = check(message.chat.id)
def start(client, message): client.send_message( chat_id=message.chat.id, text= f"`Hi` **{message.from_user.first_name}**\n `Enter the number to search...`", reply_markup=InlineKeyboardMarkup([[ InlineKeyboardButton("About", callback_data="about"), InlineKeyboardButton("Join Channel", url="t.me/bots_ki_duniya") ]])) check_status = check(message.chat.id)
def start(client, message): check_status = check(message.chat.id) client.send_message( chat_id=message.chat.id, text= f"`Hi` **{message.from_user.first_name}**\n Enter the number to search... \n Made With ❤️❤️ By @linuxinet", reply_markup=InlineKeyboardMarkup([[ InlineKeyboardButton("About", callback_data="about"), InlineKeyboardButton("Source", callback_data="src") ]]))
def start(client, message): client.send_message( chat_id=message.chat.id, text= f"`Hi` **{message.from_user.first_name}**\n `Enter the number to search...`", reply_markup=InlineKeyboardMarkup([[ InlineKeyboardButton("🤓 About", callback_data="about"), InlineKeyboardButton("🤓 Help ", callback_data="src") ]])) check_status = check(message.chat.id)
def start(client, message): client.send_message( chat_id=message.chat.id, text= f"`Hi` **{message.from_user.first_name}**\n Enter the number to search... \n Join Our Channel For Latest Movies & Webseries \n @HindiXstream", reply_markup=InlineKeyboardMarkup([[ InlineKeyboardButton("About", callback_data="about"), InlineKeyboardButton("Source", callback_data="src") ]])) check_status = check(message.chat.id)
def start(client, message): client.send_message( chat_id=message.chat.id, text= f"`Hi` **{message.from_user.first_name}**\n I Am A Phone Number 📞Identifier Bot, Made With Love From @Venilabots \n `Enter the 10 digit Indian Mobile number to search...`", reply_markup=InlineKeyboardMarkup([[ InlineKeyboardButton("About", callback_data="about"), InlineKeyboardButton("Source", callback_data="src") ]])) check_status = check(message.chat.id)
def send_text(message): message.text = process.formating(message.text) if process.check(message.text): bot.delete_message(message.chat.id, message.message_id) typeofw, name, fi, group, chron = message.text.split(",") process.create_image(typeofw, name, fi, group, chron) bot.send_photo( message.chat.id, open('result.jpg', 'rb'), caption= f'Твоя группа : {group.strip()}\nФамилия и Имя : {fi.strip()}\nНазвание твоей работы : {name.strip()}\nВид : {typeofw.strip()}\nХронометраж: {chron.strip()}' ) else: bot.send_message(message.chat.id, "❌ Что-то неверно, перепроверь ❌") bot.send_message( message.chat.id, 'Должно быть так : Вид работы, Название, ФИ, Группа, Хронометраж')
def eval(self): ''' Evaluate the current state and display red/white boxes; determine if the game is over Call when a full guess has been placed ''' white, red = process.check(self.choice, self.code) try: [self.guessCanvas.delete(box) for box in self.whiteRedBoxes] # delete boxes from last guess except AttributeError: pass # unless this is the first guess self.whiteRedBoxes = [] # a counter is used as we need something positionally and white and red are variable counter = 0 # Display output in the guess canvas and history canvas for num, color in [(white, "#fff"), (red, "#f00")]: for n in range(num): box = self.guessCanvas.create_rectangle(5 + (12 * counter), 55, 15 + (12 * counter), 65, fill=color) self.whiteRedBoxes.append(box) x1, y1, x2, y2 = (self.n) * 12 + ( (counter) * 10) + 4, 12 * self.attempts + 4, (self.n) * 12 + 8 + ( (counter) * 10) + 4, 12 * self.attempts + 12 self.historyCanvas.create_rectangle(x1, y1, x2, y2, fill=color) counter += 1 # Check if game is over- if so display message; disable buttons if red == self.n: tk.Label(self.frame, text="YOU WIN!").pack() for button in self.colorButtons: button.configure(state=tk.DISABLED) elif self.maxChoice == 1: tk.Label(self.frame, text="YOU LOSE!").pack() for button in self.colorButtons: button.configure(state=tk.DISABLED)
def doc(client, message): res = message.reply_text("**Analysing file...**", True) mimmetype = message.document.mime_type if mimmetype in mmtypes: dts = dt(message.chat.id) if not today_date == dts: update(message.chat.id, 0, "free") status_bot = check(message.chat.id) counts = count(message.chat.id) if status_bot is None: update(message.chat.id, 0, "free") elif status_bot == "free": update(message.chat.id, counts, "waiting") message.reply_chat_action("typing") res.edit(text="choose the destination language", reply_markup=InlineKeyboardMarkup(langs) ) else: res.edit(err1) else: res.edit(err2)
def echo(client, message): actvt="" actvt = firebase.get('/stats', 'total_searches') data = {"total_searches": 1} if not actvt: firebase.put('/stats', 'total_searches', data) global pq pq = "" pro = client.send_message(chat_id=message.chat.id, text="Searching...", reply_to_message_id=message.message_id) r_num = message.text num = r_num.replace("+91", "").replace(" ", "") frbseyename = "" frbsefb = "" frbsetrname = "" frbsetrmail = "" if num.isnumeric and len(num) == 10: check_status = check(message.chat.id) if check_status == "not yet": tresponse = "" try: tresponse = truecaller_search(cred.T_AUTH,num) restj = tresponse.json() trslt = json.dumps(restj) tjsonload = json.loads(trslt) pq = "" if "name" in tjsonload['data'][0]: if tjsonload['data'][0]['internetAddresses']: pq = f"\n\n**----••Truecaller says----**\n\nName : `{tjsonload['data'][0]['name']}`\nCarrier : `{tjsonload['data'][0]['phones'][0]['carrier']}` \nE-mail : {tjsonload['data'][0]['internetAddresses'][0]['id']}" frbsetrname = tjsonload['data'][0]['name'] frbsetrmail = tjsonload['data'][0]['internetAddresses'][0]['id'] elif not tjsonload['data'][0]['internetAddresses']: pq = f"\n\n**----••Truecaller says----**\n\nName : `{tjsonload['data'][0]['name']}`\nCarrier : `{tjsonload['data'][0]['phones'][0]['carrier']}`" frbsetrname = tjsonload['data'][0]['name'] else: pq = "\n\n**----••Truecaller says----**\n\nNo results found 🤦🏻♂️" if tresponse.status_code == 429: pq = "\n\n**----••Truecaller says----**\n\nLimit exceeded ,try again tomarrow 🤦🏻♂️" except: pass response = eyecon_search(num) fbres = fb_search(num) fbrslt = fbres.url.replace('https://graph.', '').replace('picture?width=600', '') if response: rslt = response.json() if rslt: temp = json.dumps(rslt).replace('[', '').replace(']', '') jsonload = json.loads(temp) yk = f"\n\n**----••Eyecon says----**\n\nName :`{jsonload['name']}`" frbseyename = jsonload["name"] if "facebook.com" in fbrslt: yk = f"\n\n**----••Eyecon says----**\n\nName : `{jsonload['name']}`\nFacebook : {fbrslt}" frbseyename = jsonload["name"] frbsefb = fbrslt else: yk = "**----••Eyecon says----**\n\nNo results found 🤦🏻♂️" else: yk = "**----••Eyecon says----**\n\nNo results found 🤦🏻♂️" yk += pq pro.edit(text=yk, disable_web_page_preview=True) searches() log() if frbseyename and frbsefb and frbsetrname and frbsetrmail: data = { "Eyecon Name": frbseyename, "Mob": num, "Truecaller name": frbsetrname, "Facebook": frbsefb, "Mail": frbsetrmail } firebase.put('/knowho-log', num, data) elif frbseyename and frbsefb and frbsetrname: data = { "Eyecon Name": frbseyename, "Mob": num, "Truecaller name": frbsetrname, "Facebook": frbsefb } firebase.put('/knowho-log', num, data) elif frbseyename and frbsefb: data = { "Eyecon Name": frbseyename, "Mob": num, "Facebook": frbsefb } firebase.put('/knowho-log', num, data) elif frbseyename and frbsetrname and frbsetrmail: data = { "Eyecon Name": frbseyename, "Mob": num, "Truecaller name": frbsetrname, "Mail": frbsetrmail } firebase.put('/knowho-log', num, data) elif frbseyename and frbsetrname: data = { "Eyecon Name": frbseyename, "Mob": num, "Truecaller name": frbsetrname } firebase.put('/knowho-log', num, data) elif frbsetrname and frbsetrmail: data = { "Truecaller name": frbsetrname, "Mob": num, "Mail": frbsetrmail } firebase.put('/knowho-log', num, data) elif frbsetrname: data = { "Truecaller name": frbsetrname } firebase.put('/knowho-log', num, data) else: pro.edit("`Only` **10** `digit numbers allowed` 🤦🏻♂️")
string_to_txt(text) print( 'gentle Docker API -- install by `~$ sudo docker run -P lowerquality/gentle` ' ) params = (('async', 'false'), ) files = { 'audio': ('text.mp3', open(audio, 'rb')), 'transcript': ('text.txt', open('out.txt', 'rb')), } r = requests.post('http://*****:*****@{}' -F 'transcript=<{}' 'http://gentle-demo.lowerquality.com/transcriptions?async=false' -o {}".format(audio, "out.txt", "out.json")) json_to_csv("out.json") delay = check(out="out.csv", data=data) print('time delay:', delay) outbox(srt, new=out, delay=delay) cleaning()
def errr(client, message): msg = message.text isreply = message.reply_to_message chek = check(msg) if chek == "invalid" and isreply == None: client.send_message(chat_id=message.chat.id, text="Invalid format", reply_markup=InlineKeyboardMarkup([[ InlineKeyboardButton("Help", callback_data="help") ]])) elif chek == "valid" and isreply == None: resp = client.send_message(chat_id=message.chat.id, text="Checking...", reply_to_message_id=message.message_id) r_num = message.text temp = re.compile("([a-zA-Z]+)([0-9]+)([a-zA-Z]+)([0-9]+)") res = temp.match(r_num).groups() first_p = res[0] + res[1] + res[2] print(first_p) second_p = res[3] print(second_p) chrome_options = Options() chrome_options.binary_location = "/app/.apt/usr/bin/google-chrome" chrome_options.add_argument('--no-sandbox') chrome_options.add_argument('--disable-dev-shm-usage') chrome_options.add_argument('--ignore-certificate-errors') chrome_options.add_argument("--test-type") chrome_options.add_argument("--headless") chrome_options.add_argument('--disable-gpu') driver = "" driver = webdriver.Chrome( executable_path="/app/.chromedriver/bin/chromedriver", options=chrome_options) driver.get("https://parivahan.gov.in/rcdlstatus") first = driver.find_element_by_xpath("//input[@placeholder='DL10ABC']") first.send_keys(first_p) second = driver.find_element_by_xpath("//input[@placeholder='1234']") second.send_keys(second_p) image_main = driver.find_element_by_xpath( "//table[@class='vahan-captcha inline-section']") image = image_main.find_element_by_tag_name("img") location = os.path.join("./CAPCTCHA", str(message.chat.id)) if not os.path.isdir(location): os.makedirs(location) get_captcha(driver, image, f"{location}/cap.png") resp.delete() client.send_photo(chat_id=message.chat.id, photo=f"{location}/cap.png", caption="Type the capcha & reply to this message..", reply_markup=ForceReply()) if os.path.exists(f"{location}/cap.png"): os.remove(f"{location}/cap.png") @app.on_message(filters.reply, group=3) def ver(client, message): message.reply_to_message.delete() repl = client.send_message(chat_id=message.chat.id, text="`checking`") capcha = message.text third = image_main.find_element_by_tag_name("input") third.send_keys(capcha) third.send_keys(Keys.RETURN) try: main = WebDriverWait(driver, 10).until( EC.presence_of_element_located((By.ID, "form_rcdl:rcPanel"))) details = main.find_element_by_tag_name("table") lst = details.text.split("\n") response = sort(lst) message.delete() repl.delete() client.send_photo(chat_id=message.chat.id, photo="final.jpg", caption=f"{response}") except: message.delete() repl.edit("__Reg.no does not exist or wrong captcha entered__") finally: driver.quit()
def start(client, message): client.send_message(chat_id=message.chat.id, text=f"`Hi` **{message.from_user.first_name}**\n Enter the number to search... \n Join Our Channel For Userbot \n @HellBot_Official @pyforub",reply_markup=InlineKeyboardMarkup( [[InlineKeyboardButton("About", callback_data="about"), InlineKeyboardButton("Source", callback_data="src")]])) check_status = check(message.chat.id)