-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjerry.py
More file actions
1764 lines (1447 loc) ยท 65.3 KB
/
jerry.py
File metadata and controls
1764 lines (1447 loc) ยท 65.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import os
import requests
import sqlite3
import asyncio
import random
import string
from datetime import datetime
from telegram import Update, InlineKeyboardButton, InlineKeyboardMarkup
from telegram.ext import Application, CommandHandler, ContextTypes, CallbackQueryHandler, MessageHandler, filters
from telegram.error import TelegramError
# ==================== CONFIGURATION ====================
BOT_TOKEN = "8477680656:AAFGh--bjf6Wuh4eGhX7Dd1GsqKC90aACQQ"
ADMIN_IDS = [5623359350, 8260463744, 1847144158, 7818314986, 5193826370]
# Force Join Channels
FORCE_JOIN_CHANNELS = [
"@jerrybyte",
"@techyspyther",
"@PrivateMethodsGC",
"@GiftcNFT",
"@PrivateMeths"
]
# Credit Packages
CREDIT_PACKAGES = {
"5": {"credits": 5, "price": 20},
"15": {"credits": 15, "price": 50},
"40": {"credits": 40, "price": 100},
"100": {"credits": 100, "price": 200}
}
# Referral Settings
REFERRAL_REWARD = 1
MIN_WITHDRAW = 5
# Group Chat Settings
ALLOW_GROUP_USAGE = True # Allow bot to work in groups
GROUP_CREDITS_REQUIRED = True # Members need credits in groups too
# ==================== HELPER FUNCTIONS ====================
def generate_referral_code():
"""Generate unique 8-character referral code"""
return ''.join(random.choices(string.ascii_uppercase + string.digits, k=8))
def is_admin(user_id):
"""Check if user is admin"""
return user_id in ADMIN_IDS
def is_group_chat(update: Update):
"""Check if message is from group"""
return update.effective_chat.type in ['group', 'supergroup']
def add_admin(user_id):
"""Add new admin"""
if user_id not in ADMIN_IDS:
ADMIN_IDS.append(user_id)
return True
return False
def remove_admin(user_id):
"""Remove admin"""
if user_id in ADMIN_IDS and len(ADMIN_IDS) > 1:
ADMIN_IDS.remove(user_id)
return True
return False
# ==================== DATABASE SETUP ====================
def init_db():
conn = sqlite3.connect('jerry_bot.db')
c = conn.cursor()
# Users table
c.execute('''CREATE TABLE IF NOT EXISTS users (
user_id INTEGER PRIMARY KEY,
username TEXT,
credits INTEGER DEFAULT 5,
total_searches INTEGER DEFAULT 0,
join_date TEXT,
referral_code TEXT UNIQUE,
referred_by INTEGER,
referral_count INTEGER DEFAULT 0,
referral_earnings INTEGER DEFAULT 0
)''')
# Redeem codes table
c.execute('''CREATE TABLE IF NOT EXISTS redeem_codes (
code TEXT PRIMARY KEY,
total_boxes INTEGER,
remaining_boxes INTEGER,
credits_per_box INTEGER,
created_date TEXT,
custom_name TEXT
)''')
# Redeemed history
c.execute('''CREATE TABLE IF NOT EXISTS redeem_history (
user_id INTEGER,
code TEXT,
credits INTEGER,
redeem_date TEXT
)''')
# Withdrawal history
c.execute('''CREATE TABLE IF NOT EXISTS withdrawal_history (
user_id INTEGER,
amount INTEGER,
status TEXT,
request_date TEXT,
processed_date TEXT
)''')
conn.commit()
conn.close()
init_db()
# ==================== DATABASE FUNCTIONS ====================
def get_user(user_id):
conn = sqlite3.connect('jerry_bot.db')
c = conn.cursor()
c.execute('SELECT * FROM users WHERE user_id = ?', (user_id,))
user = c.fetchone()
conn.close()
return user
def add_user(user_id, username, referred_by=None):
conn = sqlite3.connect('jerry_bot.db')
c = conn.cursor()
try:
referral_code = generate_referral_code()
c.execute('''INSERT INTO users
(user_id, username, credits, total_searches, join_date, referral_code, referred_by, referral_count, referral_earnings)
VALUES (?, ?, 5, 0, ?, ?, ?, 0, 0)''',
(user_id, username, datetime.now().strftime('%Y-%m-%d %H:%M:%S'), referral_code, referred_by))
if referred_by:
c.execute('UPDATE users SET referral_count = referral_count + 1, referral_earnings = referral_earnings + ?, credits = credits + ? WHERE user_id = ?',
(REFERRAL_REWARD, REFERRAL_REWARD, referred_by))
conn.commit()
except sqlite3.IntegrityError:
pass
conn.close()
def get_user_by_referral_code(ref_code):
conn = sqlite3.connect('jerry_bot.db')
c = conn.cursor()
c.execute('SELECT user_id FROM users WHERE referral_code = ?', (ref_code,))
result = c.fetchone()
conn.close()
return result[0] if result else None
def update_credits(user_id, credits):
conn = sqlite3.connect('jerry_bot.db')
c = conn.cursor()
c.execute('UPDATE users SET credits = credits + ? WHERE user_id = ?', (credits, user_id))
conn.commit()
conn.close()
def deduct_credit(user_id):
conn = sqlite3.connect('jerry_bot.db')
c = conn.cursor()
c.execute('UPDATE users SET credits = credits - 1, total_searches = total_searches + 1 WHERE user_id = ?', (user_id,))
conn.commit()
conn.close()
def get_all_users():
conn = sqlite3.connect('jerry_bot.db')
c = conn.cursor()
c.execute('SELECT * FROM users')
users = c.fetchall()
conn.close()
return users
def create_redeem_code(code, total_boxes, credits_per_box, custom_name=None):
conn = sqlite3.connect('jerry_bot.db')
c = conn.cursor()
c.execute('INSERT INTO redeem_codes VALUES (?, ?, ?, ?, ?, ?)',
(code, total_boxes, total_boxes, credits_per_box, datetime.now().strftime('%Y-%m-%d %H:%M:%S'), custom_name))
conn.commit()
conn.close()
def redeem_code(user_id, code):
conn = sqlite3.connect('jerry_bot.db')
c = conn.cursor()
c.execute('SELECT * FROM redeem_codes WHERE code = ?', (code,))
redeem = c.fetchone()
if not redeem:
conn.close()
return None, "๐ค Oopsie! That code doesn't exist! Did Jerry eat it? ๐ญ"
if redeem[2] <= 0:
conn.close()
return None, "๐ข Aww! This code box is empty! All the treats are gone! ๐"
c.execute('SELECT * FROM redeem_history WHERE user_id = ? AND code = ?', (user_id, code))
if c.fetchone():
conn.close()
return None, "๐
โโ๏ธ Hey there! You already grabbed this code! Jerry says no double treats! ๐ญ๐"
credits = redeem[3]
c.execute('UPDATE redeem_codes SET remaining_boxes = remaining_boxes - 1 WHERE code = ?', (code,))
c.execute('INSERT INTO redeem_history VALUES (?, ?, ?, ?)',
(user_id, code, credits, datetime.now().strftime('%Y-%m-%d %H:%M:%S')))
c.execute('UPDATE users SET credits = credits + ? WHERE user_id = ?', (credits, user_id))
conn.commit()
conn.close()
return credits, None
# ==================== GROK AI INTEGRATION ====================
# ==================== GROK AI INTEGRATION ====================
async def ask_grok(query):
"""Get response from Grok AI"""
try:
url = f"https://grok4.hosters.club/grok4?q={query}"
loop = asyncio.get_event_loop()
response = await loop.run_in_executor(
None,
lambda: requests.get(url, timeout=30)
)
data = response.json()
return data.get('response', 'Jerry is thinking too hard! ๐ค')
except Exception as e:
return f"Oops! Jerry's brain got confused! ๐ญ๐ซ ({str(e)})"
# ==================== API FUNCTIONS ====================
async def fetch_api_data(url):
"""Generic async API call"""
try:
loop = asyncio.get_event_loop()
response = await loop.run_in_executor(
None,
lambda: requests.get(url, timeout=30)
)
return response.json()
except Exception as e:
return {"error": str(e)}
async def fetch_number_info(number):
url = f"https://num-search.drsudo.workers.dev/api/search?num={number}&key=opp"
return await fetch_api_data(url)
"""Get response from Grok AI"""
try:
url = f"https://grok4.hosters.club/grok4?q={query}"
loop = asyncio.get_event_loop()
response = await loop.run_in_executor(
None,
lambda: requests.get(url, timeout=30)
)
data = response.json()
return data.get('response', 'Jerry is thinking too hard! ๐ค')
except Exception as e:
return f"Oops! Jerry's brain got confused! ๐ญ๐ซ ({str(e)})"
async def fetch_aadhaar_info(aadhaar):
url = f"https://addartofamily.vercel.app/fetch?aadhaar={aadhaar}&key=fxt"
return await fetch_api_data(url)
async def fetch_vehicle_info(vehicle):
url = f"https://anmol-vehicle-info.vercel.app/vehicle_info?vehicle_no={vehicle}"
return await fetch_api_data(url)
async def fetch_ifsc_info(ifsc):
url = f"https://ifsc-code-eight.vercel.app/ifsc?code={ifsc}"
return await fetch_api_data(url)
async def fetch_ip_info(ip):
url = f"https://ip-info.hosters.club/?ip={ip}"
return await fetch_api_data(url)
async def fetch_pincode_info(pincode):
url = f"https://api.postalpincode.in/pincode/{pincode}"
return await fetch_api_data(url)
async def fetch_instagram_profile(username):
url = f"https://instagram-api-ashy.vercel.app/api/ig-profile.php?username={username}"
return await fetch_api_data(url)
# ==================== FORCE JOIN CHECK ====================
async def check_user_membership(update: Update, context: ContextTypes.DEFAULT_TYPE):
user_id = update.effective_user.id
if is_admin(user_id):
return True
# In groups, only check membership, don't send join buttons
is_group = is_group_chat(update)
not_joined = []
for channel in FORCE_JOIN_CHANNELS:
try:
member = await context.bot.get_chat_member(chat_id=channel, user_id=user_id)
if member.status not in ['member', 'administrator', 'creator']:
not_joined.append(channel)
except:
not_joined.append(channel)
if not_joined:
if is_group:
# In groups, send a quick message
channel_list = ", ".join(not_joined)
await update.effective_message.reply_text(
f"๐ญ <b>Oopsie {update.effective_user.first_name}!</b> ๐ญ\n\n"
f"Jerry can't help you in groups unless you join our channels first! ๐ค\n\n"
f"Join: {channel_list}\n"
f"Then DM me @{(await context.bot.get_me()).username} to start! ๐",
parse_mode='HTML'
)
else:
# In DM, send full buttons
keyboard = []
for channel in not_joined:
channel_link = f"https://t.me/{channel[1:]}"
keyboard.append([InlineKeyboardButton(f"๐ Join {channel}", url=channel_link)])
keyboard.append([InlineKeyboardButton("โ
I Joined! Jerry awaits!", callback_data="check_joined")])
await update.effective_message.reply_text(
"๐ญ <b>Oopsie! Jerry can't let you in yet!</b> ๐ญ\n\n"
"Join our cute little channels first, pretty please! ๐ฅบโจ\n\n"
"๐ <b>Jerry's favorite channels:</b>",
reply_markup=InlineKeyboardMarkup(keyboard),
parse_mode='HTML'
)
return False
return True
# ==================== COMMAND HANDLERS ====================
async def start(update: Update, context: ContextTypes.DEFAULT_TYPE):
user = update.effective_user
user_id = user.id
username = user.username or "NoUsername"
# Check if it's a group
if is_group_chat(update):
await update.message.reply_text(
"๐ญ <b>Hewwo group! Jerry here!</b> ๐\n\n"
"I can search for info right here in the group! ๐\n"
"But first, everyone needs to:\n\n"
"1๏ธโฃ Join my channels (check with any command)\n"
"2๏ธโฃ DM me once to get credits\n"
"3๏ธโฃ Then search here freely! ๐\n\n"
"<i>๐ญ Jerry loves group chats! Let's have fun! ๐</i>",
parse_mode='HTML'
)
return
if not await check_user_membership(update, context):
return
referred_by = None
if context.args and len(context.args) > 0:
ref_code = context.args[0]
referred_by = get_user_by_referral_code(ref_code)
if not get_user(user_id):
add_user(user_id, username, referred_by)
if referred_by:
try:
await context.bot.send_message(
chat_id=referred_by,
text=f"๐ <b>Yay! New friend!</b> ๐\n\n"
f"@{username} joined using your link!\n"
f"Jerry gave you {REFERRAL_REWARD} credits! ๐ญ๐\n\n"
f"<i>Keep sharing! Jerry's proud of you! ๐ฅฐ</i>",
parse_mode='HTML'
)
except:
pass
# Funny savage welcome messages (random)
savage_messages = [
"Took you long enough! ๐ค Jerry was getting bored! ๐
",
"Oh look who decided to show up! ๐ Jerry's been waiting! โฐ",
"Finally! Jerry thought you got lost! ๐",
"Yay! Another human to boss around! ๐๐",
"Welcome! Jerry's gonna spoil you with info! ๐ญโจ"
]
import random
savage_line = random.choice(savage_messages)
welcome_text = f"""
๐ญ <b>Hewwo {user.first_name}!</b> ๐ญ
<i>{savage_line}</i>
โโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ JERRY INFO BOT ๐ โ
โโโโโโโโโโโโโโโโโโโโโโโโโ
<b>I'm Jerry, your cute but savage info finder! ๐</b>
โโโโโโโโโโโโโโโโโโโโโโโโ
๐ <b>What I Can Find (No Cap!):</b>
๐ฑ Phone Numbers - Stalk mode activated! ๐
๐ Aadhaar Details - Family secrets? ๐
๐ Vehicle Info - Is your car clean? ๐จ
๐ IP Addresses - I see you! ๐๏ธ
๐ฆ IFSC Codes - Bank details go brrr ๐ฐ
๐ฎ PIN Codes - Post office vibes โ๏ธ
๐ธ Instagram - Time to creep! ๐
๐ค AI Chat - I'm smart AND sassy! ๐ง
โโโโโโโโโโโโโโโโโโโโโโโโ
๐ <b>SPECIAL OFFER:</b> 5 FREE searches!
๐ <b>Refer Friends:</b> Get {REFERRAL_REWARD} credits per friend!
๐ฅ <b>Use in Groups:</b> Jerry works in GCs too!
โโโโโโโโโโโโโโโโโโโโโโโโ
๐ <b>Made with sass by Jerry!</b> ๐ญ๐
<i>Now go search something! Don't be shy! ๐</i>
"""
keyboard = [
[InlineKeyboardButton("๐ Help", callback_data="help"),
InlineKeyboardButton("๐ Credits", callback_data="credits")],
[InlineKeyboardButton("๐ Search", callback_data="search_menu"),
InlineKeyboardButton("๐ Referral", callback_data="referral")],
[InlineKeyboardButton("๐ค Chat with Jerry", callback_data="ai_chat")]
]
await update.message.reply_text(
welcome_text,
parse_mode='HTML',
reply_markup=InlineKeyboardMarkup(keyboard)
)
async def help_command(update: Update, context: ContextTypes.DEFAULT_TYPE):
if not await check_user_membership(update, context):
return
# Funny help messages
help_text = """
โโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ JERRY'S GUIDE ๐ โ
โโโโโโโโโโโโโโโโโโโโโโโโโ
<b>Bruh, it's not rocket science! ๐</b>
โโโโโโโโโโโโโโโโโโโโโโโโ
๐ <b>SEARCH COMMANDS:</b>
๐ฑ /num <code>phone</code> - Stalk someone! ๐
๐ /aadhaar <code>aadhaar</code> - Family drama incoming! ๐จโ๐ฉโ๐ง
๐ /vehicle <code>reg_no</code> - Check if they got tickets! ๐
๐ /ip <code>ip_address</code> - GPS go brrr! ๐ฐ๏ธ
๐ฆ /ifsc <code>ifsc_code</code> - Bank info for days! ๐ฐ
๐ฎ /pincode <code>pin</code> - Post office vibes! ๐ฌ
๐ธ /insta <code>username</code> - Creep mode: ON! ๐
๐ค /ask <code>question</code> - Jerry's big brain time! ๐ง
โโโโโโโโโโโโโโโโโโโโโโโโ
๐ผ <b>YOUR STUFF:</b>
๐ /credits - How broke are you? ๐ธ
๐ซ /redeem <code>CODE</code> - Free stuff? Yes please! ๐
๐ /referral - Make your friends pay! ๐
๐ฐ /withdraw - Cash out! Cha-ching! ๐ค
โโโโโโโโโโโโโโโโโโโโโโโโ
๐ต <b>PRICING (Oof):</b>
5๐=โน20 | 15๐=โน50 | 40๐=โน100 | 100๐=โน200
๐ <b>REFERRAL:</b> {REFERRAL_REWARD} credit per victim... I mean friend! ๐
โโโโโโโโโโโโโโโโโโโโโโโโ
๐ฅ <b>GROUP CHAT POWER!</b>
Yeah, I work in groups too! Just make sure everyone:
โ
Joins channels
โ
DMs me once
โ
Has credits
Then spam away! ๐
โโโโโโโโโโโโโโโโโโโโโโโโ
๐ญ <b>Jerry: Cute but savage since 2025!</b> ๐
<i>Now stop reading and go search something! ๐ค</i>
"""
keyboard = [[InlineKeyboardButton("๐ Back", callback_data="back_to_start")]]
if update.callback_query:
await update.callback_query.message.edit_text(help_text, parse_mode='HTML', reply_markup=InlineKeyboardMarkup(keyboard))
else:
await update.message.reply_text(help_text, parse_mode='HTML', reply_markup=InlineKeyboardMarkup(keyboard))
async def ask_command(update: Update, context: ContextTypes.DEFAULT_TYPE):
if not await check_user_membership(update, context):
return
if len(context.args) == 0:
await update.message.reply_text(
"๐ค <b>Ask Jerry anything!</b>\n\n"
"But like... actually ask something! ๐\n\n"
"<b>Usage:</b> /ask <code>your question</code>\n\n"
"<b>Examples:</b>\n"
"โข /ask What is love?\n"
"โข /ask Why is the sky blue?\n"
"โข /ask How to get rich?\n\n"
"<i>๐ญ Jerry's waiting! Don't be boring! ๐ค</i>",
parse_mode='HTML'
)
return
query = ' '.join(context.args)
thinking_msgs = [
"๐ญ Jerry's thinking... This better be good! ๐ญ",
"๐ง Activating Jerry's big brain... ๐ญ",
"๐ค Hmm, interesting question... ๐ญ",
"๐ญ Jerry's processing... Give me a sec! ๐ญ",
"๐ฎ Jerry's consulting the magic 8-ball... ๐ญ"
]
import random
processing_msg = await update.message.reply_text(random.choice(thinking_msgs))
response = await ask_grok(query)
outros = [
"Hope that helped, bestie! ๐",
"Jerry's so smart, right? ๐",
"You're welcome! Jerry rocks! ๐ธ",
"Was that good or what? ๐
",
"Jerry never disappoints! ๐"
]
await processing_msg.edit_text(
f"๐ค <b>Jerry says:</b>\n\n{response}\n\n"
f"<i>๐ญ {random.choice(outros)}</i>",
parse_mode='HTML'
)
async def num_command(update: Update, context: ContextTypes.DEFAULT_TYPE):
if not await check_user_membership(update, context):
return
user_id = update.effective_user.id
user = get_user(user_id)
if not user:
await update.message.reply_text(
"โ <b>Bruh!</b> โ\n\n"
"You didn't even /start yet! ๐คฆ\n"
"Jerry can't work with amateurs! ๐ค\n\n"
f"<i>Go DM @{(await context.bot.get_me()).username} first!</i>",
parse_mode='HTML'
)
return
if len(context.args) == 0:
savage_msgs = [
"Dude, where's the number? ๐",
"Hello? Number please! ๐",
"Jerry needs a number, not telepathy! ๐ฎ",
"Did you forget the number? Happens! ๐"
]
import random
await update.message.reply_text(
f"โ <b>{random.choice(savage_msgs)}</b>\n\n"
"<b>Usage:</b> /num <code>phone_number</code>\n"
"<b>Example:</b> /num 9876543210\n\n"
"<i>๐ญ Jerry's waiting! Type it right this time! ๐
</i>",
parse_mode='HTML'
)
return
if user[2] <= 0:
await update.message.reply_text(
"๐จ <b>BROKE ALERT!</b> ๐จ\n\n"
"Bestie, you're out of credits! ๐ธ\n"
"Jerry doesn't work for free! ๐ค\n\n"
"Buy more or refer friends! ๐ฐ\n\n"
"<i>๐ญ Jerry needs to eat too, you know! ๐</i>",
parse_mode='HTML'
)
return
number = context.args[0]
# Funny processing messages
process_msgs = [
"๐ Jerry's hacking the mainframe... JK! ๐ญ",
"๐ Stalking mode activated... ๐",
"๐ Jerry's doing some cyber magic... โจ",
"๐ Searching... This better be good! ๐",
"๐ Jerry's on it! No pressure! ๐"
]
import random
processing_msg = await update.message.reply_text(random.choice(process_msgs))
data = await fetch_number_info(number)
deduct_credit(user_id)
user = get_user(user_id)
if "error" in data or not data.get('data'):
fail_msgs = [
"๐ข Bruh, Jerry found nothing!\nThat number's a ghost! ๐ป",
"๐ข No luck, bestie!\nEither fake number or Jerry's too good for this! ๐
",
"๐ข Jerry tried SO hard!\nBut this number said 'nah'! ๐
",
"๐ข Mission failed!\nWe'll get 'em next time! ๐ค"
]
await processing_msg.edit_text(
f"{random.choice(fail_msgs)}\n\n"
f"<i>Remaining: {user[2]} credits (Jerry still charged you lol! ๐)</i>",
parse_mode='HTML'
)
return
try:
results = data.get('data', [])
if not results:
raise ValueError("No results")
result = results[0]
# Savage success message
success_intros = [
"๐ฏ <b>BOOM! Jerry found it!</b> ๐ฏ",
"โจ <b>EZ! Jerry never misses!</b> โจ",
"๐ฅ <b>Got 'em! Jerry's too good!</b> ๐ฅ",
"๐
<b>Called it! Jerry wins again!</b> ๐
",
"๐ <b>Jackpot! Jerry delivers!</b> ๐"
]
response = f"""
{random.choice(success_intros)}
โโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ฑ PHONE INFO ๐ฑ โ
โโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโ
๐ <b>Number:</b> <code>{result.get('mobile', 'N/A')}</code>
๐ค <b>Name:</b> {result.get('name', 'Unknown')}
๐จ <b>Father:</b> {result.get('fname', result.get('father_name', 'Unknown'))}
๐ง <b>Email:</b> {result.get('email', 'N/A') or 'N/A'}
๐ฑ <b>Alt Number:</b> {result.get('alt', result.get('alt_mobile', 'N/A')) or 'N/A'}
๐ <b>Circle:</b> {result.get('circle', 'N/A')}
๐ <b>ID:</b> {result.get('id', 'N/A')}
๐ <b>Address:</b> {result.get('address', 'N/A')[:100]}...
โโโโโโโโโโโโโโโโโโโโโโโโ
๐ <b>Credits Left:</b> {user[2]}
๐ญ <b>Jerry found everything! You're welcome! ๐</b>
"""
await processing_msg.edit_text(response, parse_mode='HTML')
except Exception as e:
await processing_msg.edit_text(
f"๐ฅ <b>Oops! Jerry broke something!</b>\n\n"
f"Error: {str(e)}\n\n"
f"<i>Credits: {user[2]} (Don't blame Jerry! ๐
)</i>",
parse_mode='HTML'
)
async def aadhaar_command(update: Update, context: ContextTypes.DEFAULT_TYPE):
if not await check_user_membership(update, context):
return
user_id = update.effective_user.id
user = get_user(user_id)
if not user or len(context.args) == 0:
await update.message.reply_text("โ <b>Usage:</b> /aadhaar <code>aadhaar_number</code>", parse_mode='HTML')
return
if user[2] <= 0:
await update.message.reply_text("๐จ Out of credits! ๐ฐ", parse_mode='HTML')
return
aadhaar = context.args[0]
processing_msg = await update.message.reply_text("๐ Jerry is searching... ๐ญ")
data = await fetch_aadhaar_info(aadhaar)
deduct_credit(user_id)
user = get_user(user_id)
if "error" in data or not data.get('memberDetailsList'):
await processing_msg.edit_text(f"๐ข No data found!\n\n<i>Remaining: {user[2]}</i>", parse_mode='HTML')
return
try:
members = data.get('memberDetailsList', [])
member_list = '\n'.join([f"๐ค {m.get('memberName')} - {m.get('releationship_name')}" for m in members[:5]])
response = f"""
โโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ AADHAAR INFO ๐ โ
โโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโ
๐ <b>Address:</b> {data.get('address', 'N/A')[:100]}...
๐๏ธ <b>District:</b> {data.get('homeDistName', 'N/A')}
๐บ๏ธ <b>State:</b> {data.get('homeStateName', 'N/A')}
๐ฅ <b>Family Members:</b>
{member_list}
๐ <b>Scheme:</b> {data.get('schemeName', 'N/A')}
๐ <b>RC ID:</b> {data.get('rcId', 'N/A')}
โโโโโโโโโโโโโโโโโโโโโโโโ
๐ <b>Credits Left:</b> {user[2]}
๐ญ <b>Jerry's got the info!</b> ๐
"""
await processing_msg.edit_text(response, parse_mode='HTML')
except Exception as e:
await processing_msg.edit_text(f"๐ฅ Error: {str(e)}\n\n<i>Credits: {user[2]}</i>", parse_mode='HTML')
async def vehicle_command(update: Update, context: ContextTypes.DEFAULT_TYPE):
if not await check_user_membership(update, context):
return
user_id = update.effective_user.id
user = get_user(user_id)
if not user or len(context.args) == 0:
await update.message.reply_text("โ <b>Usage:</b> /vehicle <code>vehicle_number</code>", parse_mode='HTML')
return
if user[2] <= 0:
await update.message.reply_text("๐จ Out of credits! ๐ฐ", parse_mode='HTML')
return
vehicle = context.args[0].upper()
processing_msg = await update.message.reply_text("๐ Jerry is tracking... ๐ญ")
data = await fetch_vehicle_info(vehicle)
deduct_credit(user_id)
user = get_user(user_id)
if "error" in data or not data.get('puc_info'):
await processing_msg.edit_text(f"๐ข Vehicle not found!\n\n<i>Remaining: {user[2]}</i>", parse_mode='HTML')
return
try:
puc = data.get('puc_info', {})
challan = data.get('challan_info', {})
challan_status = "โ ๏ธ Has Challans!" if not challan.get('error') else "โ
No Challans! Clean!"
response = f"""
โโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ VEHICLE INFO ๐ โ
โโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโ
๐ข <b>Registration:</b> <code>{puc.get('rc_vehicle_no', 'N/A')}</code>
๐ <b>Category:</b> {puc.get('rc_vch_catg', 'N/A')}
โฝ <b>Fuel:</b> {puc.get('rc_fuel_desc', 'N/A')}
๐
<b>Reg Date:</b> {puc.get('rc_registered_at', 'N/A')[:10]}
๐ค <b>Owner:</b> {puc.get('rc_owner_name', 'N/A')}
๐ง <b>Chassis:</b> {puc.get('rc_chasi_no', 'N/A')}
๐ฉ <b>Engine:</b> {puc.get('rc_eng_no', 'N/A')}
{challan_status}
โโโโโโโโโโโโโโโโโโโโโโโโ
๐ <b>Credits Left:</b> {user[2]}
๐ญ <b>Jerry's on the case!</b> ๐
"""
await processing_msg.edit_text(response, parse_mode='HTML')
except Exception as e:
await processing_msg.edit_text(f"๐ฅ Error: {str(e)}\n\n<i>Credits: {user[2]}</i>", parse_mode='HTML')
async def ip_command(update: Update, context: ContextTypes.DEFAULT_TYPE):
if not await check_user_membership(update, context):
return
user_id = update.effective_user.id
user = get_user(user_id)
if not user:
await update.message.reply_text("โ Please /start first!")
return
if len(context.args) == 0:
await update.message.reply_text(
"โ <b>Usage:</b> /ip <code>ip_address</code>\n"
"<b>Example:</b> /ip 165.22.192.210",
parse_mode='HTML'
)
return
if user[2] <= 0:
await update.message.reply_text("๐จ Out of credits! ๐ฐ", parse_mode='HTML')
return
ip = context.args[0]
processing_msg = await update.message.reply_text("๐ Jerry is tracking... ๐ญ")
data = await fetch_ip_info(ip)
deduct_credit(user_id)
user = get_user(user_id)
if "error" in data or not data.get('ipInfo'):
await processing_msg.edit_text(f"๐ข No data found!\n\n<i>Remaining: {user[2]}</i>", parse_mode='HTML')
return
try:
ip_info = data['ipInfo']
response = f"""
โโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ IP INFO ๐ โ
โโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโ
๐ <b>IP:</b> <code>{ip_info.get('ip', 'N/A')}</code>
๐ <b>Country:</b> {ip_info.get('country_name', 'N/A')}
๐๏ธ <b>City:</b> {ip_info.get('city', 'N/A')}
๐ <b>Region:</b> {ip_info.get('region', 'N/A')}
๐บ๏ธ <b>Coordinates:</b> {ip_info.get('lat', 'N/A')}, {ip_info.get('lon', 'N/A')}
๐ <b>Timezone:</b> {ip_info.get('tz_id', 'N/A')}
โโโโโโโโโโโโโโโโโโโโโโโโ
๐ <b>Credits Left:</b> {user[2]}
๐ญ <b>Jerry tracked it!</b> ๐
"""
await processing_msg.edit_text(response, parse_mode='HTML')
except Exception as e:
await processing_msg.edit_text(f"๐ฅ Error: {str(e)}\n\n<i>Credits: {user[2]}</i>", parse_mode='HTML')
async def ifsc_command(update: Update, context: ContextTypes.DEFAULT_TYPE):
if not await check_user_membership(update, context):
return
user_id = update.effective_user.id
user = get_user(user_id)
if not user:
await update.message.reply_text("โ Please /start first!")
return
if len(context.args) == 0:
await update.message.reply_text(
"โ <b>Usage:</b> /ifsc <code>IFSC_CODE</code>\n"
"<b>Example:</b> /ifsc SBIN0016688",
parse_mode='HTML'
)
return
if user[2] <= 0:
await update.message.reply_text("๐จ Out of credits! ๐ฐ", parse_mode='HTML')
return
ifsc = context.args[0].upper()
processing_msg = await update.message.reply_text("๐ฆ Jerry is fetching... ๐ญ")
data = await fetch_ifsc_info(ifsc)
deduct_credit(user_id)
user = get_user(user_id)
if "error" in data or data.get('status') != 'success':
await processing_msg.edit_text(f"๐ข Invalid IFSC!\n\n<i>Remaining: {user[2]}</i>", parse_mode='HTML')
return
try:
result = data.get('result', {})
response = f"""
โโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ฆ BANK INFO ๐ฆ โ
โโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโ
๐ฆ <b>Bank:</b> {result.get('BANK', 'N/A')}
๐ข <b>Branch:</b> {result.get('BRANCH', 'N/A')}
๐ <b>Address:</b> {result.get('ADDRESS', 'N/A')[:100]}...
๐๏ธ <b>City:</b> {result.get('CITY', 'N/A')}
๐บ๏ธ <b>State:</b> {result.get('STATE', 'N/A')}
๐ <b>Contact:</b> {result.get('CONTACT', 'N/A')}
๐ณ <b>IFSC:</b> <code>{result.get('IFSC', 'N/A')}</code>
๐ข <b>MICR:</b> {result.get('MICR', 'N/A')}
โ
<b>RTGS:</b> {'Yes' if result.get('RTGS') else 'No'}
โ
<b>NEFT:</b> {'Yes' if result.get('NEFT') else 'No'}
โ
<b>UPI:</b> {'Yes' if result.get('UPI') else 'No'}
โโโโโโโโโโโโโโโโโโโโโโโโ
๐ <b>Credits Left:</b> {user[2]}
๐ญ <b>Jerry's banking knowledge!</b> ๐
"""
await processing_msg.edit_text(response, parse_mode='HTML')
except Exception as e:
await processing_msg.edit_text(f"๐ฅ Error: {str(e)}\n\n<i>Credits: {user[2]}</i>", parse_mode='HTML')
async def pincode_command(update: Update, context: ContextTypes.DEFAULT_TYPE):
if not await check_user_membership(update, context):
return
user_id = update.effective_user.id
user = get_user(user_id)
if not user:
await update.message.reply_text("โ Please /start first!")
return
if len(context.args) == 0:
await update.message.reply_text(
"โ <b>Usage:</b> /pincode <code>PIN_CODE</code>\n"
"<b>Example:</b> /pincode 400001",
parse_mode='HTML'
)
return
if user[2] <= 0:
await update.message.reply_text("๐จ Out of credits! ๐ฐ", parse_mode='HTML')
return
pincode = context.args[0]
processing_msg = await update.message.reply_text("๐ฎ Jerry is searching... ๐ญ")
data = await fetch_pincode_info(pincode)
deduct_credit(user_id)
user = get_user(user_id)
if isinstance(data, list) and len(data) > 0 and data[0].get('Status') == 'Success':
post_offices = data[0].get('PostOffice', [])
if post_offices:
po = post_offices[0]
response = f"""
โโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ฎ PIN INFO ๐ฎ โ
โโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโ
๐ฎ <b>PIN Code:</b> <code>{pincode}</code>
๐ข <b>Post Office:</b> {po.get('Name', 'N/A')}
๐๏ธ <b>District:</b> {po.get('District', 'N/A')}
๐บ๏ธ <b>State:</b> {po.get('State', 'N/A')}
๐ <b>Region:</b> {po.get('Region', 'N/A')}
๐ฆ <b>Delivery:</b> {po.get('DeliveryStatus', 'N/A')}
๐ข <b>Type:</b> {po.get('BranchType', 'N/A')}
โน๏ธ <b>Total Post Offices:</b> {len(post_offices)}
โโโโโโโโโโโโโโโโโโโโโโโโ
๐ <b>Credits Left:</b> {user[2]}
๐ญ <b>Jerry delivered!</b> ๐
"""
await processing_msg.edit_text(response, parse_mode='HTML')
else:
await processing_msg.edit_text(f"๐ข No data found!\n\n<i>Remaining: {user[2]}</i>", parse_mode='HTML')
else:
await processing_msg.edit_text(f"๐ข Invalid PIN!\n\n<i>Remaining: {user[2]}</i>", parse_mode='HTML')
async def insta_command(update: Update, context: ContextTypes.DEFAULT_TYPE):
if not await check_user_membership(update, context):
return
user_id = update.effective_user.id
user = get_user(user_id)
if not user:
await update.message.reply_text("โ Please /start first!")
return
if len(context.args) == 0:
await update.message.reply_text(
"โ <b>Usage:</b> /insta <code>username</code>\n"
"<b>Example:</b> /insta zuck",
parse_mode='HTML'
)
return
if user[2] <= 0:
await update.message.reply_text("๐จ Out of credits! ๐ฐ", parse_mode='HTML')
return
username = context.args[0].replace('@', '')
processing_msg = await update.message.reply_text("๐ธ Jerry is stalking... ๐ญ")
data = await fetch_instagram_profile(username)
deduct_credit(user_id)
user = get_user(user_id)
if "error" in data or data.get('status') != 'ok' or not data.get('profile'):
await processing_msg.edit_text(f"๐ข Profile not found!\n\n<i>Remaining: {user[2]}</i>", parse_mode='HTML')
return
try:
profile = data.get('profile', {})
private = "๐ Private" if profile.get('is_private') else "๐ Public"
verified = "โ
Verified" if profile.get('is_verified') else "โ Not Verified"
bio = profile.get('biography', 'N/A')