forked from iamNVN/AnyCheckerBot
-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.php
259 lines (192 loc) · 6.96 KB
/
main.php
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
<?php
ob_start();
///////////===[IMPORTING RESOURCES]===///////////
include "./Resources/Vars.php";
include "./Resources/Functions.php";
define('API_KEY',$API_KEY);
error_reporting(0);
///////////===[IMPORTING PLUGINS]===///////////
include "./Plugins/bin.php";
include "./Plugins/iban.php";
include "./Plugins/stripekey.php";
include "./Plugins/weather.php";
include "./Plugins/dictionary.php";
include "./Plugins/cccheck.php";
include "./Plugins/proxy.php";
include "./Plugins/covid.php";
include "./Plugins/currency.php";
if (empty($username2)) {
$username2 = '<a href="tg://user?id=$from_id">$from_fname</a>';
}
////////////////=========[START MESSAGE]=========////////////////
if(strpos($text, "/start") === 0){
bot('sendmessage',[
'chat_id'=>$chat_id,
'text'=>"<b>Hey $from_fname,
I'm $USERNAMEBOT. I can do several Things! ❤️
Click the Button Below to open help menu!</b>",
'parse_mode'=>'html',
'reply_to_message_id'=> $message_id,
'reply_markup'=>json_encode(['inline_keyboard'=>[
[['text'=>"Help 💬",'callback_data'=>"help"]]
],'resize_keyboard'=>true])
]);
//////////////////////////////////////////////
if (isset($TG_DUMP_CHAT)) {
bot('sendmessage',[
'chat_id'=>$TG_DUMP_CHAT,
'text'=>"<b>User Started Bot</b>
First Name:- $from_fname
User Name:- @$username2
User ID:- <code>$from_id</code>
Current Time:- <code>$date1</code>",
'parse_mode'=>'html',
]);
}
}
////////////////=========[HELP MENU]=========////////////////
if($data == "help"){ //Sends Help Menu if Help Button is clicked
bot('editMessageText',[
'chat_id'=>$chatid,
'message_id'=>$messageid,
'text'=>"<b>Hello there! I'm $USERNAMEBOT
I can do Several Things!</b>
Click on the buttons below to get documentation about specific modules!",
'parse_mode'=>'html',
'reply_markup'=>json_encode(['inline_keyboard'=>[
[['text'=>"Bin Checker",'callback_data'=>"bin"],['text'=>"Covid-19 Stats",'callback_data'=>"covid"],['text'=>"Currency Converter",'callback_data'=>"monigay"]],[['text'=>"Dictionary",'callback_data'=>"dict"],['text'=>"IBAN Checker",'callback_data'=>"iban"],['text'=>"Proxy Scrapper",'callback_data'=>"proxy"]],[['text'=>"SK Checker",'callback_data'=>"stripe"],['text'=>"Weather",'callback_data'=>"weather"]],
],'resize_keyboard'=>true])
]);
}
////////////////=========[HELP MENU]=========////////////////
if(strpos($text, "/help") === 0){ //Sends Help Menu if User sent /help.
bot('sendmessage',[ //Can't use "OR" Operator because it edits the Message in Callback Query and Sends Message in /help.
'chat_id'=>$chat_id,
'text'=>"<b>Hello there! I'm $USERNAMEBOT
I can do Several Things!</b>
Click on the buttons below to get documentation about specific modules!",
'parse_mode'=>'html',
'reply_to_message_id'=> $message_id,
'reply_markup'=>json_encode(['inline_keyboard'=>[
[['text'=>"Bin Checker",'callback_data'=>"bin"],['text'=>"Covid-19 Stats",'callback_data'=>"covid"],['text'=>"Currency Converter",'callback_data'=>"monigay"]],[['text'=>"Dictionary",'callback_data'=>"dict"],['text'=>"IBAN Checker",'callback_data'=>"iban"],['text'=>"Proxy Scrapper",'callback_data'=>"proxy"]],[['text'=>"SK Checker",'callback_data'=>"stripe"],['text'=>"Weather",'callback_data'=>"weather"]],
],'resize_keyboard'=>true])
]);
}
////////////////=========[BIN INFO]=========////////////////
if($data == "bin"){
bot('editMessageText',[
'chat_id'=>$chatid,
'message_id'=>$messageid,
'text'=>"<b>🌀 Bin Checker 🌀
Command:</b>
/bin <code><bin></code> - Checks the Bin and Provides Information",
'parse_mode'=>'html',
'reply_markup'=>json_encode(['inline_keyboard'=>[
[['text'=>"Return",'callback_data'=>"help"]],
],'resize_keyboard'=>true])
]);
}
////////////////=========[COVID-19 STATS]=========////////////////
if($data == "covid"){
bot('editMessageText',[
'chat_id'=>$chatid,
'message_id'=>$messageid,
'text'=>"<b>🌀 Covid-19 Stats 🌀
Command:</b>
/covid - Provides Worldwide Covid-19 Stats
/covid <code><country></code> - Provides Covid-19 Stats for the Given Country",
'parse_mode'=>'html',
'reply_markup'=>json_encode(['inline_keyboard'=>[
[['text'=>"Return",'callback_data'=>"help"]],
],'resize_keyboard'=>true])
]);
}
////////////////=========[CURRENCY CONVERTER]=========////////////////
if($data == "monigay"){
bot('editMessageText',[
'chat_id'=>$chatid,
'message_id'=>$messageid,
'text'=>"<b>🌀 Currency Converter 🌀
Command:</b>
/cash <code><Value><from><to></code> - Converts the Currency
<b>Example:- /cash 20 USD INR - Converts 20 USD to INR</b>",
'parse_mode'=>'html',
'reply_markup'=>json_encode(['inline_keyboard'=>[
[['text'=>"Return",'callback_data'=>"help"]],
],'resize_keyboard'=>true])
]);
}
////////////////=========[DICTIONARY]=========////////////////
if($data == "dict"){
bot('editMessageText',[
'chat_id'=>$chatid,
'message_id'=>$messageid,
'text'=>"<b>🌀 Dictionary 🌀
Command:</b>
/dict <code><word></code> - Provides the Meaning of the Given Word.",
'parse_mode'=>'html',
'reply_markup'=>json_encode(['inline_keyboard'=>[
[['text'=>"Return",'callback_data'=>"help"]],
],'resize_keyboard'=>true])
]);
}
////////////////=========[IBAN CHECKER]=========////////////////
if($data == "iban"){
bot('editMessageText',[
'chat_id'=>$chatid,
'message_id'=>$messageid,
'text'=>"<b>🌀 IBAN Checker 🌀
Command:</b>
/iban <code><iban></code> - Checks if the Provided IBAN is Valid or Invalid.",
'parse_mode'=>'html',
'reply_markup'=>json_encode(['inline_keyboard'=>[
[['text'=>"Return",'callback_data'=>"help"]],
],'resize_keyboard'=>true])
]);
}
////////////////=========[STRIPE KEY CHECKER]=========////////////////
if($data == "stripe"){
bot('editMessageText',[
'chat_id'=>$chatid,
'message_id'=>$messageid,
'text'=>"<b>🌀 SK Key Checker 🌀
Command:</b>
/sk <code><sk_live_xxxx></code> - Checks if the Provided Stripe API Key is Valid or Invalid.",
'parse_mode'=>'html',
'reply_markup'=>json_encode(['inline_keyboard'=>[
[['text'=>"Return",'callback_data'=>"help"]],
],'resize_keyboard'=>true])
]);
}
////////////////=========[PROXY]=========////////////////
if($data == "proxy"){
bot('editMessageText',[
'chat_id'=>$chatid,
'message_id'=>$messageid,
'text'=>"<b>🌀 Proxy Scrapper 🌀
Command:</b>
/http - Sends Fresh HTTPs Proxies
/socks4 - Sends Fresh Socks4 Proxies
/socks5 - Sends Fresh Socks5 Proxies",
'parse_mode'=>'html',
'reply_markup'=>json_encode(['inline_keyboard'=>[
[['text'=>"Return",'callback_data'=>"help"]],
],'resize_keyboard'=>true])
]);
}
////////////////=========[WEATHER INFO]=========////////////////
if($data == "weather"){
bot('editMessageText',[
'chat_id'=>$chatid,
'message_id'=>$messageid,
'text'=>"<b>🌀 Weather Info 🌀
Command:</b>
/weather <code><Name of City></code> - Provides the Current Weather of the Provided City.
<b>Note:-</b> <code>It only Supports Cities.</code>",
'parse_mode'=>'html',
'reply_markup'=>json_encode(['inline_keyboard'=>[
[['text'=>"Return",'callback_data'=>"help"]],
],'resize_keyboard'=>true])
]);
}
?>