· 6 years ago · Jan 18, 2020, 07:16 PM
1import instabot
2import telegram
3from telegram.ext import Updater,CommandHandler,MessageHandler,ConversationHandler, Filters
4from telegram.ext import CallbackQueryHandler, PicklePersistence
5from telegram import InlineKeyboardButton, InlineKeyboardMarkup
6from instabot.api.api import API
7import random
8import time
9import logging
10
11logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',level=logging.INFO)
12logger = logging.getLogger(__name__)
13
14u = Updater(token='987812301:AAGQhKRmFoWsD_HJ4PqEnKMKkvo4FtCT2T0', use_context=True)
15credict = {}
16SOLVEVCHALLENGEHELPER = 0
17SOLVEVCHALLENGEHELPER2 = 1
18dispatcher = u.dispatcher
19PASSWORD = 1
20PASSWORDHANDLE = 0
21HOME = 2
22RHELPER = 3
23LOCK1 = 7
24lockdict = {}
25j = u.job_queue
26botlist = []
27lastmediacheck = {}
28acceptedusers = ['Idyllic']
29logger.info("starting")
30globalcount = [0]
31botdict = {}
32bot0_1dict = {}
33bot0_1list = []
34bot1_20dict = {}
35bot20_50dict = {}
36bot50_100dict = {}
37bot100dict = {}
38bot1_20list = []
39bot20_50list = []
40bot50_100list = []
41bot100list = []
42followerdict = {}
43
44def start(update, context):
45 logger.info("/start")
46 keyboard = [[InlineKeyboardButton("Login", callback_data='button1'),
47 InlineKeyboardButton("FAQ", callback_data='button2')],
48 [InlineKeyboardButton("My Accounts", callback_data='button3'),
49 InlineKeyboardButton("Groupchat", url = "https://t.me/theboostme")],[InlineKeyboardButton("Current Users", callback_data='button5'),
50 InlineKeyboardButton("Remove Accounts", callback_data='button6')]]
51 name = update.effective_user.first_name
52 reply_markup = InlineKeyboardMarkup(keyboard)
53 startext = "Hello " + name + " and welcome to *Boostme*!" + "\n" + "" + "\n" + "This bot utilizes automatic likes to help you organically grow your Instagram account; around 30 seconds after you post a photo you will see likes flow in from our other users." + "\n" + "" + "\n" + "At the moment *BoostMe* is completely free to use and enjoy. If you are unfamiliar with autolikes it is highly recommended that you read our FAQ before starting!" + "\n" + "" + "\n" + "If you have any other questions feel free to contact our admins!"
54 update.message.reply_text(startext, reply_markup=reply_markup, parse_mode=telegram.ParseMode.MARKDOWN)
55
56
57def return_start(update, context):
58 logger.info("/return_start")
59 logger.debug("/return_start")
60 keyboard = [[InlineKeyboardButton("Login", callback_data='button1'),
61 InlineKeyboardButton("FAQ", callback_data='button2')],
62 [InlineKeyboardButton("My Accounts", callback_data='button3'),
63 InlineKeyboardButton("Groupchat", url = "https://t.me/theboostme")],[InlineKeyboardButton("Current Users", callback_data='button5'),
64 InlineKeyboardButton("Remove Accounts", callback_data='button6')]]
65 name = update.effective_user.first_name
66 reply_markup = InlineKeyboardMarkup(keyboard)
67 startext = "Hello " + name + " and welcome to *Boostme*!" + "\n" + "" + "\n" + "This bot utilizes automatic likes to help you organically grow your Instagram account; around 30 seconds after you post a photo you will see likes flow in from our other users." + "\n" + "" + "\n" + "At the moment *BoostMe* is completely free to use and enjoy. If you are unfamiliar with autolikes it is highly recommended that you read our FAQ before starting!" + "\n" + "" + "\n" + "If you have any other questions feel free to contact our admins!"
68 logger.debug(update.callback_query.edit_message_text(startext, reply_markup=reply_markup, parse_mode=telegram.ParseMode.MARKDOWN))
69
70def my_accounts(update, context):
71 query = update.callback_query
72 keyboard = [[InlineKeyboardButton("Return Home", callback_data='returnhome2')]]
73 reply_markup = InlineKeyboardMarkup(keyboard)
74 accountinfo = ""
75 if len(context.user_data) == 0:
76 query.edit_message_text(text="You have no accounts currently in the system",reply_markup=reply_markup)
77 else:
78 num = len(credict)-1
79 for key in context.user_data:
80 #randnum = random.randint(0, num)
81 #followers = len(botlist[randnum].get_user_followers(key))
82 accountinfo += ("@" + key + '\n')
83 query.edit_message_text(text="Your current accounts: " + '\n' + accountinfo,reply_markup=reply_markup)
84
85def removeaccount(update, context):
86 query = update.callback_query
87 keyboard = [[InlineKeyboardButton("Return Home", callback_data='returnhome2')]]
88 reply_markup = InlineKeyboardMarkup(keyboard)
89 accountinfo = ""
90 num = len(credict)-1
91 if len(context.user_data) == 0:
92 query.edit_message_text(text="You have no accounts registered with us yet",reply_markup=reply_markup)
93 else:
94 for key in context.user_data:
95 #randnum = random.randint(0, num)
96 #followers = len(botlist[randnum].get_user_followers(key))
97 accountinfo += ("@" + key + "\n")
98 query.edit_message_text(text="Respond with the username of the account you would like to remove. (no @)" + "\n" + "" + "\n" + accountinfo, reply_markup=reply_markup)
99 return RHELPER
100
101def rhelper(update, context):
102 logger.info("rhelp")
103 toremove = update.message.text
104 keyboard = [[InlineKeyboardButton("Return Home", callback_data='returnhome2')]]
105 reply_markup = InlineKeyboardMarkup(keyboard)
106 if toremove not in user_data:
107 context.bot.send_message(chat_id=update.effective_chat.id, text="Sorry, the account you specified is not currently registered under you.",reply_markup=reply_markup)
108 else:
109 idx = botdict[toremove]
110 del context.user_data[toremove]
111 del botlist[idx]
112 context.bot.send_message(chat_id=update.effective_chat.id, text="I removed " + toremove + " , you will no longer recieve or give likes.",reply_markup=reply_markup)
113
114def users(update, context):
115 query = update.callback_query
116 keyboard = [[InlineKeyboardButton("Return Home", callback_data='returnhome2')]]
117 reply_markup = InlineKeyboardMarkup(keyboard)
118 accountinfo = ""
119 accountcount = 0
120 bot1accounts = ""
121 bot20accounts = ""
122 bot50accounts = ""
123 bot100accounts = ""
124 bot100up = ""
125 if len(credict) == 0:
126 query.edit_message_text(text="There are currently no accounts registered with us",reply_markup=reply_markup)
127 else:
128 #followersum = 0
129 num = len(credict)-1
130 for key in credict:
131 accountcount +=1
132 followers = followerdict[key]
133 if 0 <= followers <= 1000:
134 bot1accounts += '@'
135 bot1accounts += key
136 bot1accounts += '\n'
137 elif 1000 < followers <= 20000:
138 bot20accounts += '@'
139 bot20accounts += key
140 bot20accounts += '\n'
141 elif 20000 < followers <= 50000:
142 bot50accounts += '@'
143 bot50accounts += key
144 bot50accounts += '\n'
145 elif 50000 < followers <= 100000:
146 bot100accounts += '@'
147 bot100accounts += key
148 bot100accounts += '\n'
149 elif followers > 100000:
150 bot100up += '@'
151 bot100up += key
152 bot100up += '\n'
153 query.edit_message_text(text="Total accounts in the system: " + str(accountcount) + "\n" + "" + "\n" + "0-1k Range:" + '\n' + bot1accounts + '\n' + "1k-20k Range:" + '\n' + bot20accounts + '\n' + "20k-50k Range:" + '\n' + bot50accounts + '\n' + "50k-100k Range:" + '\n' + bot100accounts + '\n' + "100k plus range:" + '\n' + bot100up ,reply_markup=reply_markup)
154
155def addaccount(update, context):
156 logger.info("/addaccount")
157 query = update.callback_query
158 query.edit_message_text(text="Send the username of the account that you want to add, or /cancel")
159 return PASSWORD
160
161def password(update, context):
162 logger.info("/password")
163 keyboard = [[InlineKeyboardButton("Return Home", callback_data='returnhome2')]]
164 reply_markup = InlineKeyboardMarkup(keyboard)
165 username = ""
166 newusername = (update.message.text).lower()
167 for letter in newusername:
168 if letter != "@":
169 username += letter
170 if len(credict) != 0:
171 if username in credict:
172 context.bot.send_message(chat_id=update.effective_chat.id, text="This account is already in our system.",reply_markup=reply_markup)
173 return ConversationHandler.END
174 keyboard = [[InlineKeyboardButton("Return Home", callback_data='returnhome2')]]
175 reply_markup = InlineKeyboardMarkup(keyboard)
176 newid = update.effective_user.username
177 (context.chat_data)[newid] = [username]
178 context.bot.send_message(chat_id=update.effective_chat.id, text="Awesome now send your password, or use /cancel to cancel")
179 return PASSWORDHANDLE
180
181def passwordhandle(update, context):
182 context.chat_data["wrongcode"] = False
183 context.chat_data["solvecheck"] = False
184 logger.info("/passwordhandle")
185 keyboard = [[InlineKeyboardButton("Return Home", callback_data='returnhome2')]]
186 reply_markup = InlineKeyboardMarkup(keyboard)
187 newid = update.effective_user.username
188 password = update.message.text
189 check = update.message.text
190 (context.chat_data)[newid].append(password) #adds to local dict, specifc to chat...
191 botid = str(update.effective_user.id)
192 context.bot.send_message(chat_id=update.effective_chat.id, text="Processing give me a second...")
193 if context.chat_data[newid][0] in lockdict:
194 botid = lockdict[context.chat_data[newid][0]]
195 else:
196 botid = instabot.Bot(like_delay=4,max_likes_per_day=100000000,max_unlikes_per_day=10000000,max_follows_per_day=3500000,max_unfollows_per_day=350000000,max_comments_per_day=1000000,max_blocks_per_day=100000,max_unblocks_per_day=1000000,max_likes_to_like=1000000000,min_likes_to_like=-1,max_messages_per_day=3000000,filter_users=False,filter_private_users=False,filter_users_without_profile_photo=False,filter_previously_followed=False,filter_business_accounts=False,filter_verified_accounts=False,max_followers_to_follow=5000000,min_followers_to_follow=-1,max_following_to_follow=200000000,min_following_to_follow=-1,max_followers_to_following_ratio=150000000,max_following_to_followers_ratio=1500000000,min_media_count_to_follow=-1,max_following_to_block=20000000000,unlike_delay=10,follow_delay=30,unfollow_delay=30,comment_delay=60,block_delay=30,unblock_delay=30,message_delay=60,stop_words=("shop", "store", "free"),blacklist_hashtags=["#shop", "#store", "#free"],blocked_actions_protection=True,blocked_actions_sleep=False,blocked_actions_sleep_delay=300,verbosity=True,device=None,save_logfile=True,log_filename=None,log_follow_unfollow=False)
197 log = botid.login(update, context, check, ask_for_code=True, username = (context.chat_data)[newid][0], password = (context.chat_data)[newid][1],is_threaded = True)
198 if log == False and context.chat_data["solvecheck"] == False:
199 if context.chat_data["wrongcode"] == True:
200 context.bot.send_message(chat_id=update.effective_chat.id, text="The code you replied with is incorrect, kindly attempt to login again via the main menu",reply_markup=reply_markup)
201 context.chat_data["solvecheck"] = False #resets solve check.
202 context.chat_data["wrongcode"] = False
203 return ConversationHandler.END
204 else:
205 context.bot.send_message(chat_id=update.effective_chat.id, text="The password you entered is incorrect, please try again.",reply_markup=reply_markup)
206 userlock = context.chat_data[newid][0]
207 lockdict[userlock] = botid
208 context.chat_data.clear()
209 return ConversationHandler.END
210 elif log == False and context.chat_data["solvecheck"] == True:
211 logger.info("Code Sent!")
212 context.chat_data["lockedbot"] = botid
213 return LOCK1
214 else:
215 botlist.append(botid)
216 num = len(botlist)-1
217 if num == 0:
218 randnum = 0
219 else:
220 randnum = random.randint(0, num)
221 followers = len(botlist[randnum].get_user_followers(context.chat_data[newid][0]))
222 credict[(context.chat_data)[newid][0]] = (context.chat_data)[newid][1] #adds to global user pass dict
223 if 0 <= followers <= 1000:
224 bot0_1dict[(context.chat_data)[newid][0]] = (context.chat_data)[newid][1]
225 bot0_1list.append(botid)
226 elif 1000 < followers <= 20000:
227 bot1_20dict[(context.chat_data)[newid][0]] = (context.chat_data)[newid][1]
228 bot1_20list.append(botid)
229 elif 20000 < followers <= 50000:
230 bot20_50dict[(context.chat_data)[newid][0]] = (context.chat_data)[newid][1]
231 bot20_50list.append(botid)
232 elif 50000 < followers <= 100000:
233 bot50_100dict[(context.chat_data)[newid][0]] = (context.chat_data)[newid][1]
234 bot50_100list.append(botid)
235 elif followers > 100:
236 bot100dict[(context.chat_data)[newid][0]] = (context.chat_data)[newid][1]
237 bot100list.append(botid)
238 context.bot.send_message(chat_id=update.effective_chat.id, text="Sucessfully logged in! Liking should start automatically next time you post",reply_markup=reply_markup)
239 write_file(credict, (str(update.effective_user.id)))
240 user = context.chat_data[newid][0]
241 followerdict[user] = followers
242 botdict[user] = globalcount[0]
243 globalcount[0] += 1
244 passw = context.chat_data[newid][1]
245 context.user_data[user] = passw
246 context.chat_data.clear()
247 return ConversationHandler.END
248
249def lock1(update, context):
250 keyboard = [[InlineKeyboardButton("Return Home", callback_data='returnhome2')]]
251 reply_markup = InlineKeyboardMarkup(keyboard)
252 check = update.message.text
253 newid = update.effective_user.username
254 botid = context.chat_data["lockedbot"]
255 code = update.message.text
256 context.chat_data["logincode"] = code
257 context.bot.send_message(chat_id=update.effective_chat.id, text="Processing your request, this may take up to a minute..")
258 log = botid.login(update, context, check, ask_for_code=True, username = (context.chat_data)[newid][0], password = (context.chat_data)[newid][1],is_threaded = True)
259 if log == True:
260 botlist.append(botid)
261 num = len(botlist)-1
262 if num == 0:
263 randnum = 0
264 else:
265 randnum = random.randint(0, num)
266 followers = len(botlist[randnum].get_user_followers(context.chat_data[newid][0]))
267 credict[(context.chat_data)[newid][0]] = (context.chat_data)[newid][1] #adds to global user pass dict
268 if 0 <= followers <= 1000:
269 bot0_1dict[(context.chat_data)[newid][0]] = (context.chat_data)[newid][1]
270 bot0_1list.append(botid)
271 elif 1000 < followers <= 20000:
272 bot1_20dict[(context.chat_data)[newid][0]] = (context.chat_data)[newid][1]
273 bot1_20list.append(botid)
274 elif 20000 < followers <= 50000:
275 bot20_50dict[(context.chat_data)[newid][0]] = (context.chat_data)[newid][1]
276 bot20_50list.append(botid)
277 elif 50000 < followers <= 100000:
278 bot50_100dict[(context.chat_data)[newid][0]] = (context.chat_data)[newid][1]
279 bot50_100list.append(botid)
280 elif followers > 100:
281 bot100dict[(context.chat_data)[newid][0]] = (context.chat_data)[newid][1]
282 bot100list.append(botid)
283 context.bot.send_message(chat_id=update.effective_chat.id, text="Sucessfully logged in! Liking should start automatically next time you post",reply_markup=reply_markup)
284 write_file(credict, (str(update.effective_user.id)))
285 user = context.chat_data[newid][0]
286 followerdict[user] = followers
287 botdict[user] = globalcount[0]
288 globalcount[0] += 1
289 passw = context.chat_data[newid][1]
290 context.user_data[user] = passw
291 context.chat_data.clear()
292 return ConversationHandler.END
293 if log == False:
294 context.bot.send_message(chat_id=update.effective_chat.id, text="The code you replied with is incorrect, kindly attempt to login again via the main menu",reply_markup=reply_markup)
295 context.chat_data["solvecheck"] = False #resets solve check.
296 context.chat_data["wrongcode"] = False
297 return ConversationHandler.END
298
299
300
301def like(update, context):
302 logger.info("/like")
303 context.bot.send_message(chat_id=update.effective_chat.id, text="Processing, one moment please")
304 for i in range(len(botlist)):
305 newid = botlist[i].get_media_id_from_link("https://www.instagram.com/p/B6gmXValZep/")
306 botlist[i].like_medias([newid])
307 context.bot.send_message(chat_id=update.effective_chat.id, text="Done!")
308
309def write_file(credict,botid):
310 logger.info("/writefile")
311 file = open("passwords.txt", 'w')
312 for key in credict:
313 line = key + " " + credict[key] + " " + botid +'\n'
314 file.write(line)
315 file.close()
316
317
318def restore(update, context):
319 check = 2
320 logger.info("/restore")
321 file = open("passwords.txt", 'r')
322 context.bot.send_message(chat_id=update.effective_chat.id, text="Processing give me a second.")
323 for line in file:
324 linelist = line.split()
325 newusername2 = ""
326 newusername = (linelist[0]).lower()
327 for i in newusername:
328 if i != "@":
329 newusername2 += i
330 newpassword = linelist[1]
331 credict[newusername2] = newpassword
332 botid = linelist[2]
333 botid = instabot.Bot(like_delay=4,max_likes_per_day=100000000,max_unlikes_per_day=10000000,max_follows_per_day=3500000,max_unfollows_per_day=350000000,max_comments_per_day=1000000,max_blocks_per_day=100000,max_unblocks_per_day=1000000,max_likes_to_like=1000000000,min_likes_to_like=-1,max_messages_per_day=3000000,filter_users=False,filter_private_users=False,filter_users_without_profile_photo=False,filter_previously_followed=False,filter_business_accounts=False,filter_verified_accounts=False,max_followers_to_follow=5000000,min_followers_to_follow=-1,max_following_to_follow=200000000,min_following_to_follow=-1,max_followers_to_following_ratio=150000000,max_following_to_followers_ratio=1500000000,min_media_count_to_follow=-1,max_following_to_block=20000000000,unlike_delay=10,follow_delay=30,unfollow_delay=30,comment_delay=60,block_delay=30,unblock_delay=30,message_delay=60,stop_words=("shop", "store", "free"),blacklist_hashtags=["#shop", "#store", "#free"],blocked_actions_protection=True,blocked_actions_sleep=False,blocked_actions_sleep_delay=300,verbosity=True,device=None,save_logfile=True,log_filename=None,log_follow_unfollow=False)
334 botid.login(update, context, check, ask_for_code=True, username = newusername2, password = newpassword ,is_threaded = True)
335 botlist.append(botid)
336 num = len(botlist)-1
337 if num == 0:
338 randnum = 0
339 else:
340 randnum = random.randint(0, num)
341 followers = len(botlist[randnum].get_user_followers(newusername2))
342 if 0 <= followers <= 1000:
343 bot0_1dict[newusername2] = newpassword
344 bot0_1list.append(botid)
345 elif 1000 < followers <= 20000:
346 bot1_20dict[newusername2] = newpassword
347 bot1_20list.append(botid)
348 elif 20000 < followers <= 50000:
349 bot20_50dict[newusername2] = newpassword
350 bot20_50list.append(botid)
351 elif 50000 < followers <= 100000:
352 bot50_100dict[newusername2] = newpassword
353 bot50_100list.append(botid)
354 elif followers > 100000:
355 bot100dict[newusername2] = newpassword
356 bot100list.append(botid)
357 user = newusername2
358 followerdict[user] = followers
359 botdict[user] = globalcount[0]
360 globalcount[0] += 1
361 passw = newpassword
362 context.user_data[user] = passw
363 context.chat_data.clear()
364 context.bot.send_message(chat_id=update.effective_chat.id, text="Done!")
365
366
367def check_post(context: telegram.ext.CallbackContext):
368 logger.info("checking post")
369 if len(credict) != 0:
370 num = len(credict)-1
371 randnum = random.randint(0, num)
372 else:
373 randnum = 0
374 for key in credict:
375 if len(botlist) != 0:
376 newid = botlist[randnum].get_user_id_from_username(key)
377 mediaids = botlist[randnum].get_user_medias(newid, filtration = False) #gets recent media with username id
378 if len(mediaids) > 0:
379 lastmedia = mediaids[0]
380 if key in lastmediacheck and len(mediaids) > 0:
381 if lastmediacheck[key] != lastmedia:
382 followers = followerdict[key]
383 if 0 <= followers <= 1000:
384 for i in bot0_1list:
385 seconds = random.randint(1,5)
386 i.like(lastmedia)
387 time.sleep(seconds)
388 elif 1000 < followers <= 20000:
389 for i in bot1_20list:
390 seconds = random.randint(1,5)
391 i.like(lastmedia)
392 time.sleep(seconds)
393 elif 20000 < followers <= 50000:
394 for i in bot20_50list:
395 seconds = random.randint(1,5)
396 i.like(lastmedia)
397 time.sleep(seconds)
398 elif 50000 < followers <= 100000:
399 for i in bot50_100list:
400 seconds = random.randint(1,5)
401 i.like(lastmedia)
402 time.sleep(seconds)
403 elif followers > 100000:
404 for i in bot100list:
405 seconds = random.randint(1,5)
406 i.like(lastmedia)
407 time.sleep(seconds)
408 lastmediacheck[key] = lastmedia
409 else:
410 if len(mediaids) != 0:
411 lastmediacheck[key] = lastmedia
412 else:
413 print("No media detected")
414
415def FAQ_func(update, context):
416 query = update.callback_query
417 keyboard = [[InlineKeyboardButton("Return Home", callback_data='returnhome2')]]
418 reply_markup = InlineKeyboardMarkup(keyboard)
419 faqtext = "» *Why do I need to sign in?*" + "\n" + "BoostMe uses automatic likes which means our servers need to stay logged into your account. No human being ever sees your information, it is encrypted and sent directly through instagrams api" +"\n" + "" + "\n" + "» *Is there a risk of getting banned?*" + "\n" + "Actually BoostMe is hardcoded to login to each individual account under the front of an android phone. This means Instagram just thinks a normal user is liking photos when BoostMe engages." +"\n" + "" + "\n" + "» *Why is it free?*" + "\n" + "We want a user base before we start charging for premium features, no one would pay for a bot that they don’t know works!" +"\n" + "" + "\n" + "» *How does it work?*" + "\n" + "So basically our bot utilizes Instagrams api to log in and stay logged into your account. Every time you or any other user in the system posts a photo the bot detects this post and makes everyone logged in like it. This therefore boosts your post and helps it go viral." +"\n" + "" + "\n" + "» *Will this bot actually help me grow my account?*" + "\n" + "That all depends, do you post quality content, frequently and have good page appearance? Our bot helps photos go viral, aka hit explore, but it’s no magic growth solution. Automatic likes have been proven to work as a concept." +"\n" + "" + "\n" + "» *Can I even trust you?*" + "\n" + "That’s your choice, if you don’t trust us at first use a smaller account to see that what we made actually works. Telegram is full of scammers, BoostMe is a genuine service made for the benefit of all." +"\n" + "" + "\n" + "» *Additional questions?*" + "\n" + "Contact @idyllic, Im happy to help :)"
420 query.edit_message_text(text=faqtext,reply_markup=reply_markup,parse_mode=telegram.ParseMode.MARKDOWN)
421
422
423
424def cancel(update, context):
425 logger.info("/cancel")
426 query = update.callback_query
427 keyboard = [[InlineKeyboardButton("Return Home", callback_data='returnhome')]]
428 reply_markup = InlineKeyboardMarkup(keyboard)
429 context.bot.send_message(chat_id=update.effective_chat.id, text="I cancelled your request!",reply_markup=reply_markup)
430 return ConversationHandler.END
431
432def main():
433 logger.info("starting bot")
434 my_persistence = PicklePersistence(filename='instabot')
435 start_handler = CommandHandler(command='start', callback=start)
436 like_handler = CommandHandler(command='like', callback=like)
437 restore_handler = CommandHandler(command='restore', callback=restore)
438 return_home2 = CallbackQueryHandler(return_start, pattern='returnhome2')
439 faq = CallbackQueryHandler(FAQ_func, pattern='^' + str('button2') + '$')
440 user_handler = CallbackQueryHandler(users, pattern='^' + str('button5') + '$') #registers all handlers
441 myaccounts_handler = CallbackQueryHandler(my_accounts, pattern='^' + str('button3') + '$')
442 dispatcher.add_handler(myaccounts_handler)
443 myapi = API()
444 dispatcher.add_handler(faq)
445 dispatcher.add_handler(return_home2)
446 dispatcher.add_handler(user_handler)
447 dispatcher.add_handler(start_handler)
448 dispatcher.add_handler(like_handler)
449 dispatcher.add_handler(restore_handler)
450 conv_handler = ConversationHandler(entry_points = [CommandHandler('addaccount',addaccount), CallbackQueryHandler(addaccount, pattern='^' + str('button1') + '$'),CallbackQueryHandler(return_start, pattern='returnhome')], states = {HOME: [CallbackQueryHandler(return_start, pattern='returnhome')], PASSWORD: [MessageHandler(Filters.text, password)],PASSWORDHANDLE: [MessageHandler(Filters.text, passwordhandle)],LOCK1: [MessageHandler(Filters.text, lock1)]}, fallbacks=[CallbackQueryHandler(return_start, pattern='returnhome'),CommandHandler(command='cancel', callback=cancel) ],allow_reentry = True)
451 conv_handler2 = ConversationHandler(entry_points = [CommandHandler('removeaccount',removeaccount),CallbackQueryHandler(removeaccount, pattern='^' + str('button6') + '$'),CallbackQueryHandler(return_start, pattern='returnhome')], states = {HOME: [CallbackQueryHandler(return_start, pattern='returnhome')], RHELPER: [MessageHandler(Filters.text, rhelper)]}, fallbacks=[CallbackQueryHandler(return_start, pattern='returnhome'),CommandHandler(command='cancel', callback=cancel) ],allow_reentry = True)
452 #conv_handler3 = ConversationHandler(entry_points = [CommandHandler('solvechallengehelper',myapi.solve_challenge_helper)], states = {SOLVEVCHALLENGEHELPER2: [MessageHandler(Filters.text, myapi.solve_challenge_helper2)]}, fallbacks=[CallbackQueryHandler(return_start, pattern='returnhome'),CommandHandler(command='cancel', callback=cancel) ],allow_reentry = True)
453 dispatcher.add_handler(conv_handler)
454 dispatcher.add_handler(conv_handler2)
455 job_time = j.run_repeating(check_post, interval=120, first=10)
456 u.start_polling()
457 u.idle()
458
459main()