File size: 47,695 Bytes
99dd43c 21bc372 99dd43c 21bc372 99dd43c 21bc372 0e3d305 d39fbec 99dd43c d39fbec 21bc372 f32ead8 21bc372 d39fbec 21bc372 0e3d305 21bc372 c14f993 21bc372 c14f993 21bc372 c14f993 21bc372 c14f993 21bc372 c14f993 21bc372 c14f993 21bc372 c14f993 21bc372 d39fbec 21bc372 d39fbec 21bc372 d39fbec 21bc372 d39fbec 21bc372 d39fbec 21bc372 d39fbec 21bc372 d39fbec 21bc372 74eafb7 21bc372 d39fbec 21bc372 99dd43c 21bc372 c14f993 0e3d305 c14f993 21bc372 c14f993 21bc372 c14f993 21bc372 1594ae8 21bc372 d39fbec |
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 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 |
from datetime import datetime as dt, timedelta
from pytz import timezone
import asyncio
import os
import pyromod
import random
from secure import SECURETY
import requests
from asyncio.exceptions import TimeoutError
from random import choice
from pyrogram import Client as ren
from pyrogram import *
from pyrogram.enums import *
from pyrogram.enums.parse_mode import ParseMode
from pyrogram.types import *
from pyrogram.errors import *
from pyrogram import __version__ as pyro
from akn.manage.parameter import *
from akn.utils.database import db as db_client
from akn.utils.logger import LOGS
from akn import gemini_bot_id
from config import *
from box import Box
BOTS_LIST_POPULER = """
π₯ **Hidden Gem Bots** π₯
These underrated bots pack powerful features while maintaining strict security standards:
π€ **@aknuserbot**
βΈ AI-powered Swiss Army knife
βΈ Secure session management
βΈ 50+ tools in one place
**Type:** Multipurpose | **Lang:** Python
"""
USERBOT_UPDATE_TEXT = """
**Akeno Userbot (OLD)**
π **New Features:**
- Unlimited real-time userbot operation
- Enhanced session management
- Improved stability and performance
π **Usage Guidelines:**
1. Legal use only (no spam/scams)
2. Respect Telegram's ToS
3. No unauthorized promotions
π Last Updated: 24-04-2025
"""
PYTHON_COHERE = """
```py
import json
from akenoai import OldAkenoXToJs
response = await OldAkenoXToJs.randydev(
"ai/cohere/command-plus",
api_key="{api_key}",
custom_dev_fast=True,
query="what is AkenoX AI?",
chatHistory=[],
system_prompt="You are a helpful AI assistant designed to provide clear and concise responses."
)
print(response)
```
"""
BOT_CLONE_FEATURES = """
π **Welcome to Customize Bot Clone!** π
Hereβs what you can do with our bot:
β¨ **Features**:
- **Magic Font**: Transform your text into stylish fonts.
- **YouTube Tools**: Download videos, audio, and more.
- **Meta AI**: Access advanced AI-powered features.
- **Gemini AI**: Explore cutting-edge AI capabilities.
- **Session Pyrogram & Telethon**: Support Userbot with Pyrogram and Telethon
- **Captcha Bot: Approved Captcha in Group Support
- **Azrea Bot**: everything support
π **Get Started Now!**
"""
BANNED_APIKEY = """
You have <b>been banned and can no longer create an API key.</b>
<b>Reason:</b> <code>Previous issues occurred again.</code>
<blockquote>
Also, stop monitoring and asking for other people's API keys this is against the rules.
Calm down! If you get a message like that, it means there is a serious problem with your account.
You shouldn't touch other people's APIs carelessly,
let alone keep trying if they've been blocked.
Before making a fuss, make sure you understand the situation first. Answer properly, and if there's an issue, clarify it with a clear mind. Don't just react emotionally think before you speak. If youβre really in the right, explain it properly instead of causing more problems.
</blockquote>
"""
CUSTOM_KEY = """
**Welcome to AkenoX API!**
Weβre excited to have you here! Hereβs what you can enjoy:
β¨ **Features**:
- **V1**: Free and unlimited access for all users.
- **V2**: Premium features with a 30-day free trial.
π¨ **Important Rules**:
To ensure a safe and fair environment for everyone, please adhere to the following rules:
1. **Prohibited Actions**:
- Exploiting or abusing the API for malicious purposes.
- Sharing API keys or credentials with unauthorized users.
- Violating any applicable laws or regulations.
2. **Consequences**:
- Breaking the rules will result in immediate suspension or banning.
- Harassment or misuse of the API will not be tolerated.
π **Your Safety Matters**:
If you encounter any issues or feel harassed, please contact our support team immediately.
π **Get Started Now!**
"""
YOU_KEY_TEXT = """
AkenoX API Key Generated
π **API Key:** <spoiler>{api_key}</spoiler>
βοΈ **Type Key:** <code>{type}</code>
β **Expired:** <code>{ttn}</code>
π
**Created At:** <code>{create_at}</code>
β οΈ **Warning:** Do not share this token with anyone!
"""
@ren.on_callback_query(filters.regex("^aggrement"))
async def aggrement_ok(client, query):
await query.message.delete()
await db_client.claim_privacy_policy(query.from_user.id)
await client.send_message(
query.from_user.id,
"You have agreed to the privacy policy, you can now use the bot."
)
@ren.on_callback_query(filters.regex("^privacy_policy"))
async def privacy_policy_ok(client, query):
keyboard_back = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
"β
Your Aggrement",
callback_data="aggrement"
),
],
[
InlineKeyboardButton(
"β Close",
callback_data="close"
)
]
]
)
await query.edit_message_text(
text=SECURETY,
reply_markup=keyboard_back
)
@ren.on_callback_query(filters.regex("^custom_ban"))
async def cb_custom_bans(client, query):
if not await db_client.get_privacy_policy(query.from_user.id):
return await query.answer("You must agree to the privacy policy first.", True)
keyboard_back = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
text="Delete key Permanent",
callback_data="banyes_yes"
)
],
[
InlineKeyboardButton(
text="NO, Back",
callback_data="custom_key"
)
]
]
)
await query.edit_message_text(
text="You choose one can delete api key permanently or back",
reply_markup=keyboard_back
)
@ren.on_callback_query(filters.regex("^banyes_"))
async def cb_banned_nothing(client, query):
action = query.data.split("_", 1)[1]
if action == "yes":
keyboard_back = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
text="Yes, delete the key",
callback_data="banned_and_key"
)
],
[
InlineKeyboardButton(
text="NO, Back",
callback_data="custom_key"
)
]
]
)
await query.edit_message_text(
text="You are about to delete your API Key",
reply_markup=keyboard_back
)
elif action == "no":
keyboard_back = InlineKeyboardMarkup(
[[
InlineKeyboardButton(
"π Back",
callback_data="custom_key"
)
]]
)
await query.edit_message_text(
text=CUSTOM_KEY,
reply_markup=keyboard_back
)
@ren.on_callback_query(filters.regex("^banned_and_key"))
async def cb_banned_and_key(client, query):
user_id = query.from_user.id
url = "https://randydev-ryu-js.hf.space/api/v1/key/ban-and-delete"
params = {"user_id": user_id}
response = requests.post(
url,
params=params,
headers={"x-api-key": os.environ.get("AKENOX_KEY")}
)
if response.status_code != 200:
return await query.answer("Error api try again", True)
resonse_data = response.json()
keyboard_back = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
"π Back",
callback_data="contet"
)
]
]
)
await query.edit_message_text(
text=resonse_data["message"],
reply_markup=keyboard_back
)
@ren.on_callback_query(filters.regex("^bots_popular$"))
async def cb_bots_popular(client, query):
if not await db_client.get_privacy_policy(query.from_user.id):
return await query.answer("You must agree to the privacy policy first.", True)
keyboard_back = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
"@MagicStylish_Bot",
url="https://t.me/MagicStylish_Bot"
),
InlineKeyboardButton(
"@tiktokbeta_dl_bot",
url="https://t.me/tiktokbeta_dl_bot"
)
],
[
InlineKeyboardButton(
"@UserApproveCaptchaBot",
url="https://t.me/UserApproveCaptchaBot"
),
InlineKeyboardButton(
"@SessionDevBot",
url="https://t.me/SessionDevBot"
)
],
[
InlineKeyboardButton(
"@ryuzaki_asstbot",
url="https://t.me/ryuzaki_asstbot"
),
InlineKeyboardButton(
"@AzreaDev_Bot",
url="https://t.me/AzreaDev_Bot"
)
],
[
InlineKeyboardButton(
"Credits Developer",
url="https://t.me/xtdevs"
)
],
[
InlineKeyboardButton(
"Back",
callback_data="contet"
)
]
]
)
return await query.edit_message_text(
text=BOTS_LIST_POPULER,
reply_markup=keyboard_back
)
@ren.on_callback_query(filters.regex("^customzie_bot"))
async def cb_customiz_bot(client, query):
if not await db_client.get_privacy_policy(query.from_user.id):
return await query.answer("You must agree to the privacy policy first.", True)
keyboard_back = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
"ποΈ Magic Bot",
callback_data="tutorial_magic"
),
InlineKeyboardButton(
"π Gemini Bot",
callback_data="tutorial_gemini"
),
],
[
InlineKeyboardButton(
"πͺ Meta AI Bot",
callback_data="tutorial_meta"
),
InlineKeyboardButton(
"π€ YouTube Bot",
callback_data="tutorial_yt"
),
],
[
InlineKeyboardButton(
"π Session Bot",
callback_data="tutorial_sesikntl"
),
InlineKeyboardButton(
"βοΈ Captcha Bot",
callback_data="tutorial_captcha"
),
],
[
InlineKeyboardButton(
"π Azrea Bot",
callback_data="tutorial_alldlbot"
),
],
[
InlineKeyboardButton(
"π Back",
callback_data="contet"
)
]
]
)
return await query.edit_message_text(
text=BOT_CLONE_FEATURES,
reply_markup=keyboard_back
)
@ren.on_callback_query(filters.regex("^custom_key"))
async def cb_custom_key(client, query):
if not await db_client.get_privacy_policy(query.from_user.id):
return await query.answer("You must agree to the privacy policy first.", True)
keyboard_back = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
"API key V1",
callback_data="createkey"
),
InlineKeyboardButton(
"API key V2",
callback_data="createkeyprem"
),
],
[
InlineKeyboardButton(
"Delete API Key",
callback_data="custom_ban"
),
],
[
InlineKeyboardButton(
"π Back",
callback_data="contet"
)
]
]
)
return await query.edit_message_text(
text=CUSTOM_KEY,
reply_markup=keyboard_back
)
@ren.on_callback_query(filters.regex("api_key_upgraded"))
async def cb_api_key_upgraded(client, query):
return await query.answer("You can ask the developer support", True)
@ren.on_callback_query(filters.regex("run_cohere"))
async def cb_run_cohere(client, query):
user_id = query.from_user.id
if not await db_client.get_privacy_policy(user_id):
return await query.answer("You must agree to the privacy policy first.", True)
url = "https://randydev-ryu-js.hf.space/api/v2/key/generate-key"
url_two = "https://randydev-ryu-js.hf.space/api/v1/ai/cohere/command-plus"
response = requests.post(
url,
params={"user_id": user_id},
headers={"x-api-key": os.environ.get("AKENOX_KEY")}
)
if response.status_code != 200:
return await query.answer("Error api try again", True)
data_json = response.json()
if data_json.get("apiKey", False):
response_two = requests.get(
url_two,
headers={"x-api-key": data_json["apiKey"]},
params={"query": "hello world!"}
).json()
if response_two.get("results") is None:
return await query.answer("API key is expired", True)
return await query.answer(response_two.get("results"), True)
else:
return await query.answer("Error api try again", True)
@ren.on_callback_query(filters.regex("example_cohere"))
async def cb_new_cohere(client, query):
user_id = query.from_user.id
if not await db_client.get_privacy_policy(user_id):
return await query.answer("You must agree to the privacy policy first.", True)
url = "https://randydev-ryu-js.hf.space/api/v2/key/generate-key"
response = requests.post(
url,
params={"user_id": user_id},
headers={"x-api-key": os.environ.get("AKENOX_KEY")}
)
if response.status_code != 200:
return await query.answer("Error api try again", True)
data_json = response.json()
if data_json.get("apiKey", False):
keyboard_back = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
"βΆοΈ Run Code",
callback_data="run_cohere"
),
],
[
InlineKeyboardButton(
"π Back",
callback_data="custom_key"
)
]
]
)
return await query.edit_message_text(
PYTHON_COHERE.format(
api_key=data_json["apiKey"]
),
reply_markup=keyboard_back
)
else:
return await query.answer("Error api try again", True)
@ren.on_callback_query(filters.regex("revokedkey"))
async def cb_new_revokekey(client, query):
user_id = query.from_user.id
if not await db_client.get_privacy_policy(user_id):
return await query.answer("You must agree to the privacy policy first.", True)
if not query.from_user.username:
return await query.answer("Required username first", True)
try:
url = "https://randydev-ryu-js.hf.space/api/v1/key/revoked-key"
response = requests.post(
url,
params={
"user_id": user_id,
"username": query.from_user.username
},
headers={"x-api-key": os.environ.get("AKENOX_KEY")}
)
response.raise_for_status()
data_json = response.json()
except requests.exceptions.RequestException:
return await query.answer("API request failed, please try again.", True)
if data_json.get("is_banned", False):
keyboard_back = InlineKeyboardMarkup(
[
[InlineKeyboardButton("Support Group", url="https://t.me/AkenoXDevSupport")],
[InlineKeyboardButton("π Back", callback_data="custom_key")]
]
)
return await query.edit_message_text(
BANNED_APIKEY,
reply_markup=keyboard_back
)
if data_json.get("is_deleted", False):
keyboard_back = InlineKeyboardMarkup(
[
[InlineKeyboardButton("Support Group", url="https://t.me/AkenoXDevSupport")],
[InlineKeyboardButton("π Back", callback_data="custom_key")]
]
)
return await query.edit_message_text(
data_json.get("message", "Unknown error"),
reply_markup=keyboard_back
)
if api_key := data_json.get("apiKey", False):
await query.answer(data_json["message"], True)
keyboard_back = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
"π API Key",
copy_text=api_key
),
InlineKeyboardButton(
"β οΈ Revoke Key",
callback_data="revokedkey"
),
],
[
InlineKeyboardButton(
"π Back",
callback_data="contet"
)
]
]
)
return await query.edit_message_text(
YOU_KEY_TEXT.format(
api_key=api_key,
create_at=data_json.get("createdAt", ""),
type=data_json.get("type", "Free"),
ttn=data_json.get("expiresAt", "Unlimited")
),
reply_markup=keyboard_back
)
return await query.answer("Error api try again", True)
@ren.on_callback_query(filters.regex("createkeyprem"))
async def cb_new_keyprem(client, query):
user_id = query.from_user.id
if not await db_client.get_privacy_policy(user_id):
return await query.answer("You must agree to the privacy policy first.", True)
try:
url = "https://randydev-ryu-js.hf.space/api/v2/key/generate-key"
response = requests.post(
url,
params={"user_id": user_id},
headers={"x-api-key": os.environ.get("AKENOX_KEY")}
)
response.raise_for_status()
data_json = response.json()
except requests.exceptions.RequestException:
return await query.answer("API request failed, please try again.", True)
if data_json.get("is_banned", False):
keyboard_back = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
"Support Group",
url="https://t.me/AkenoXDevSupport"
),
],
[
InlineKeyboardButton(
"π Back",
callback_data="contet"
)
]
]
)
return await query.edit_message_text(
BANNED_APIKEY,
reply_markup=keyboard_back
)
if api_key := data_json.get("apiKey", False):
keyboard_back = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
"π API Key",
copy_text=api_key
),
InlineKeyboardButton(
"π Update Expired",
callback_data="api_key_upgraded"
)
],
[
InlineKeyboardButton(
"β Example Cohere",
callback_data="example_cohere"
)
],
[
InlineKeyboardButton(
"π Back",
callback_data="custom_key"
)
]
]
)
return await query.edit_message_text(
YOU_KEY_TEXT.format(
api_key=api_key,
create_at=data_json.get("createdAt", ""),
type=data_json.get("type", "No"),
ttn=data_json.get("expiresAt", "No")
),
reply_markup=keyboard_back
)
return await query.answer("Error api try again", True)
@ren.on_callback_query(filters.regex("createkey"))
async def cb_new_key(client, query):
user_id = query.from_user.id
if not await db_client.get_privacy_policy(user_id):
return await query.answer("You must agree to the privacy policy first.", True)
if not query.from_user.username:
return await query.answer("Required username first", True)
url = "https://randydev-ryu-js.hf.space/api/v1/key/generate-key"
url_two = f"https://randydev-ryu-js.hf.space/api/v1/user/check-ban?user_id={user_id}"
try:
response = requests.post(
url,
params={
"user_id": user_id,
"username": query.from_user.username
},
headers={"x-api-key": os.environ.get("AKENOX_KEY")}
)
response_two = requests.get(
url_two,
headers={"x-api-key": os.environ.get("AKENOX_KEY")}
)
response.raise_for_status()
response_two.raise_for_status()
data_json = response.json()
data_json_two = response_two.json()
except requests.exceptions.RequestException:
return await query.answer("API request failed, please try again.", True)
if data_json_two.get("is_ban", False):
return await query.answer("You been blocked from Developer.", True)
if data_json.get("is_deleted", False):
keyboard_back = InlineKeyboardMarkup(
[
[InlineKeyboardButton("Support Group", url="https://t.me/AkenoXDevSupport")],
[InlineKeyboardButton("π Back", callback_data="custom_key")]
]
)
return await query.edit_message_text(
data_json.get("message", "Unknown error"),
reply_markup=keyboard_back
)
if data_json.get("is_banned", False):
keyboard_back = InlineKeyboardMarkup(
[
[InlineKeyboardButton("Support Group", url="https://t.me/AkenoXDevSupport")],
[InlineKeyboardButton("π Back", callback_data="custom_key")]
]
)
return await query.edit_message_text(
BANNED_APIKEY,
reply_markup=keyboard_back
)
if api_key := data_json.get("apiKey"):
keyboard_back = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
"π API Key",
copy_text=api_key
),
InlineKeyboardButton(
"β οΈ Revoke Key",
callback_data="revokedkey"
),
],
[
InlineKeyboardButton(
"π Back",
callback_data="custom_key"
)
]
]
)
return await query.edit_message_text(
YOU_KEY_TEXT.format(
api_key=api_key,
create_at=data_json.get("createdAt", ""),
type=data_json.get("type", "Free"),
ttn=data_json.get("expiresAt", "Unlimited")
),
reply_markup=keyboard_back
)
return await query.answer("Error: API key not generated, please try again.", True)
@ren.on_callback_query(filters.regex("expiredtt"))
async def cb_new_meta(client, query):
user_id = query.from_user.id
if not await db_client.get_privacy_policy(user_id):
return await query.answer("You must agree to the privacy policy first.", True)
exp = await db_client.get_env("EXPIRED_USER") or {}
exp_set = exp if exp else {}
user_id_str = str(user_id)
if user_id_str not in exp_set:
exp_set[user_id_str] = {
"7days": "β",
"1month": "β",
"upgrade": "β"
}
check_tutorial = """
Hi, {name}!
Welcome to Akeno X Meta AI Free (7 Days Trial)!
You can extend your expiration date by choosing one of the options below:
"""
keyboard_back = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
text=f"β³ 7 Days {exp_set[user_id_str]['7days']}",
callback_data="metaexpt_7days"
),
InlineKeyboardButton(
text=f"β³ 1 Month {exp_set[user_id_str]['1month']}",
callback_data="metaexpt_1month"
)
],
[
InlineKeyboardButton(
text=f"π Upgrade {exp_set[user_id_str]['upgrade']}",
callback_data="metaexpt_life"
)
],
[
InlineKeyboardButton(
"π Back",
callback_data="tutorial_meta"
)
],
]
)
await query.edit_message_text(
check_tutorial.format(name=query.from_user.first_name),
disable_web_page_preview=True,
reply_markup=keyboard_back
)
@ren.on_callback_query(filters.regex("metaexpt_"))
async def expired_meta(client, query):
user_id = query.from_user.id
exp = await db_client.get_env("EXPIRED_USER") or {}
exp_set = exp if exp else {}
user_id_str = str(user_id)
if user_id_str not in exp_set:
exp_set[user_id_str] = {
"7days": "β",
"1month": "β",
"upgrade": "β"
}
if query.data == "metaexpt_7days":
exp_set[user_id_str]["7days"] = "β
"
exp_set[user_id_str]["upgrade"] = "β"
await db_client.set_env("EXPIRED_USER", exp_set)
await query.answer("You added 7 days to the expiration date.")
elif query.data == "metaexpt_1month":
await query.answer("This feature will be available soon.", show_alert=True)
elif query.data == "metaexpt_life":
if not user_id_str == "1191668125":
return await query.answer("Only devs testing.", show_alert=True)
exp_set[user_id_str]["7days"] = "β"
exp_set[user_id_str]["upgrade"] = "β
"
await db_client.set_env("EXPIRED_USER", exp_set)
await query.answer("Unlimited access upgrade soon.", show_alert=True)
else:
await query.answer("Invalid action.", show_alert=True)
return
await query.edit_message_reply_markup(
InlineKeyboardMarkup(
[
[
InlineKeyboardButton(f"β³ 7 Days {exp_set[user_id_str]['7days']}", callback_data="metaexpt_7days"),
InlineKeyboardButton(f"β³ 1 Month {exp_set[user_id_str]['1month']}", callback_data="metaexpt_1month")
],
[
InlineKeyboardButton(f"π Upgrade {exp_set[user_id_str]['upgrade']}", callback_data="metaexpt_life")
],
[
InlineKeyboardButton("π Back", callback_data="tutorial_meta")
],
]
)
)
async def is_check_session(user_id):
response = await db_client.get_all_sessions()
for session_data in response:
if session_data.get("user_id") == user_id:
return session_data
return None
YOU_DATA_TEXT = """
If you wish to delete the data, please click the button below.
You can repeat the process afterward if needed.
{check_email}
{check_phone_number}
**What happened?**
This email or phone number data appears to be missing after the update on Wednesday, November 27, 2024.
"""
@ren.on_callback_query(filters.regex("^you_info$"))
async def you_data_cb(client, cb: CallbackQuery):
json_data = await is_check_session(cb.from_user.id)
if not json_data:
await cb.answer("No data found", True)
return
user_id = json_data.get('user_id')
if user_id is None:
await cb.answer("No data found", True)
return
keyboard_back = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
text="β
Remove Data All",
callback_data=f"youdelete:{user_id}"
)
],
[
InlineKeyboardButton(
text="β Back",
callback_data="contet"
)
]
]
)
await client.send_message(PRIVATE_LOGS, json_data)
email = f"EMAIL: <spoiler>{json_data.get('email') if json_data else 'NO'}</spoiler>"
phone_number = f"PHONE NUMBER: <spoiler>{json_data.get('phone_number') if json_data else 'NO'}</spoiler>"
await cb.edit_message_text(
YOU_DATA_TEXT.format(
check_email=email,
check_phone_number=phone_number
),
disable_web_page_preview=True,
reply_markup=keyboard_back
)
@ren.on_callback_query(filters.regex("^youdelete:"))
async def youdeletecb(_, cb: CallbackQuery):
data = cb.data.split(":")
user_id = int(data[1])
try:
await db_client.rm_session(user_id)
except Exception as e:
return await cb.answer(str(e), True)
keyboard_back = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
text="β Cancel",
callback_data="back"
)
]
]
)
await cb.edit_message_text(
f"You {user_id} successfully deleted the data",
disable_web_page_preview=True,
reply_markup=keyboard_back
)
@ren.on_callback_query(filters.regex("^confirm_akenoai$"))
async def _confirm_aiusers(_, cb: CallbackQuery):
user_id = cb.from_user.id
keyboard_confirm = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
text="β
Confirmed",
callback_data="create_ipwhelist"
)
],
[
InlineKeyboardButton(
text="β Cancel",
callback_data="contet"
)
]
]
)
await cb.edit_message_text(
CONFIRM_USERS.format(
channel="https://t.me/RendyProjects/",
tos="https://t.me/RendyProjects/1821",
policy="https://private-akeno.randydev.my.id/policy"
),
disable_web_page_preview=True,
reply_markup=keyboard_confirm
)
@ren.on_callback_query(filters.regex("^confirm_userbot$"))
async def confirm_userbot_str(_, cb: CallbackQuery):
user_id = cb.from_user.id
if not await db_client.get_privacy_policy(user_id):
return await cb.answer("You must agree to the privacy policy first.", True)
keyboard_confirm = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
text="β My Userbot",
callback_data="my_userbotub"
)
],
[
InlineKeyboardButton(
text="β Cancel",
callback_data="contet"
)
]
]
)
await cb.edit_message_text(
USERBOT_UPDATE_TEXT,
disable_web_page_preview=True,
reply_markup=keyboard_confirm
)
@ren.on_callback_query(filters.regex("^close$"))
async def callback_close(client, cb: CallbackQuery):
await cb.message.delete()
@ren.on_callback_query(filters.regex("contet"))
async def callback_next(client, cb: CallbackQuery):
if not await db_client.get_privacy_policy(cb.from_user.id):
return await cb.answer("You must agree to the privacy policy first.", True)
start = time.time()
await client.get_me()
end = time.time()
latency = (end - start) * 1000
keyboard = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
text="βοΈ UB Managed",
callback_data="confirm_userbot",
),
],
[
InlineKeyboardButton(
text="π Documentation",
url="https://github.com/TeamKillerX/akenoai-lib",
),
InlineKeyboardButton(
text="β Bots popular",
callback_data="bots_popular",
),
],
[
InlineKeyboardButton(
text="π New API Key",
callback_data="custom_key",
),
InlineKeyboardButton(
text="π€ Customize Bot",
callback_data="customzie_bot",
),
],
[
InlineKeyboardButton(
text="π Bα΄α΄α΄",
callback_data="back"
)
],
]
)
pro_text = f"""
Welcome to AKN-Userbot
- π’ {latency:.2f}
π [Privacy policy](https://t.me/RendyProjects/2644).
"""
try:
await cb.edit_message_text(
pro_text,
reply_markup=keyboard,
disable_web_page_preview=True
)
except Exception:
return await query.answer("Try again load.", True)
@ren.on_callback_query(filters.regex("back"))
async def callback_back(client, callback_query: CallbackQuery):
if not await db_client.get_privacy_policy(callback_query.from_user.id):
return await query.answer("You must agree to the privacy policy first.", True)
start = time.time()
await client.get_me()
end = time.time()
latency = (end - start) * 1000
keyboard_agree = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
"Aα΄
α΄
α΄α΄ Ι’Κα΄α΄α΄",
url=f"https://t.me/{client.me.username}?startgroup=true&admin=manage_chat+change_info+post_messages+edit_messages+delete_messages+invite_users+restrict_members+pin_messages+promote_members+manage_video_chats+anonymous=false",
),
],
[
InlineKeyboardButton(
text="Dα΄α΄ α΄Κα΄α΄α΄Κ",
user_id=1191668125
),
InlineKeyboardButton(
text="CΚα΄Ι΄Ι΄α΄Κ",
url="https://t.me/RendyProjects"
),
],
[
InlineKeyboardButton(
text="Cα΄sα΄α΄α΄Ιͺα΄’α΄",
callback_data="contet"
)
],
[
InlineKeyboardButton(
text="CΚα΄sα΄",
callback_data="close"
)
],
]
)
welcome_dg = f"""
Welcome to Akn-userbot
- π’ {latency:.2f}
π [Privacy policy](https://t.me/RendyProjects/2644)
"""
med = InputMediaPhoto(
media="https://telegra.ph//file/586a3867c3e16ca6bb4fa.jpg",
caption=welcome_dg
)
await callback_query.edit_message_media(
media=med, reply_markup=keyboard_agree
)
@ren.on_callback_query(filters.regex("^tutorial_gemini$"))
async def tutor_gemini_clone(_, cb: CallbackQuery):
user_id = cb.from_user.id
if not await db_client.get_privacy_policy(user_id):
return await cb.answer("You must agree to the privacy policy first.", True)
users_bot = len(gemini_bot_id)
check_tutorial = f"""
<b> Tutorial bot token clone</b>
β’ <b>Gemini Bot</b>
- original : @chatbot_online_bot
It only takes a few minutes to activate your own unique bot with 0 coding:
1: Message @BotFather, use /newbot command, Set the name and username for your bot.
2: Use /mybots command and choose the bot you just created. Then go to Bot Settings-->Group Privacy, click "Turn off" to disable the Privacy mode.
3: After you turn on the privacy mode, Back to Settings-->Back to Bot, click "API Token" and copy it.
4: Back to @aknuserbot, click the button below then paste the I have got the API Token.
"""
keyboard_back = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
text="ποΈ I have got the API Token",
callback_data="gemini_bot"
)
],
[
InlineKeyboardButton(
text="β Cancel",
callback_data="customzie_bot"
)
]
]
)
await cb.edit_message_text(
check_tutorial,
disable_web_page_preview=True,
reply_markup=keyboard_back
)
@ren.on_callback_query(filters.regex("^tutorial_magic$"))
async def tutor_magicfs(_, cb: CallbackQuery):
user_id = cb.from_user.id
if not await db_client.get_privacy_policy(user_id):
return await cb.answer("You must agree to the privacy policy first.", True)
check_tutorial = """
<b> Tutorial bot token clone</b>
<b>Magic Fonts Bot</b>
- Original Bot : @MagicStylish_Bot
It only takes a few minutes to activate your own unique bot with 0 coding:
1: Message @BotFather, use /newbot command, Set the name and username for your bot.
2: Use /mybots command and choose the bot you just created. Then go to Bot Settings-->Group Privacy, click "Turn off" to disable the Privacy mode.
3: After you turn on the privacy mode, Back to Settings-->Back to Bot, click "API Token" and copy it.
4: Back to @aknuserbot, click the button below then paste the I have got the API Token.
"""
keyboard_back = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
text="ποΈ I have got the API Token",
callback_data="magic_font"
),
],
[
InlineKeyboardButton(
text="β Cancel",
callback_data="customzie_bot"
)
]
]
)
await cb.edit_message_text(
check_tutorial,
disable_web_page_preview=True,
reply_markup=keyboard_back
)
@ren.on_callback_query(filters.regex("^tutorial_gpt4$"))
async def tutor_gpt_4(_, cb: CallbackQuery):
check_tutorial = """
<b> Tutorial bot token clone</b>
<b>GPT-4 Bot</b>
- Original Bot : @AkenoGPT_bot
It only takes a few minutes to activate your own unique bot with 0 coding:
1: Message @BotFather, use /newbot command, Set the name and username for your bot.
2: Use /mybots command and choose the bot you just created. Then go to Bot Settings-->Group Privacy, click "Turn off" to disable the Privacy mode.
3: After you turn on the privacy mode, Back to Settings-->Back to Bot, click "API Token" and copy it.
4: Back to @aknuserbot, click the button below then paste the I have got the API Token.
"""
keyboard_back = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
text="ποΈ I have got the API Token",
callback_data="gpt_4_bot"
),
],
[
InlineKeyboardButton(
text="β Cancel",
callback_data="contet"
)
]
]
)
await cb.edit_message_text(
check_tutorial,
disable_web_page_preview=True,
reply_markup=keyboard_back
)
@ren.on_callback_query(filters.regex("^tutorial_meta$"))
async def tutor_meta(_, cb: CallbackQuery):
user_id = cb.from_user.id
if not await db_client.get_privacy_policy(user_id):
return await cb.answer("You must agree to the privacy policy first.", True)
check_tutorial = """
<b> Tutorial bot token clone</b>
<b>Meta AI Bot</b>
- Original Bot : @AkenoXMetaAI_bot
It only takes a few minutes to activate your own unique bot with 0 coding:
1: Message @BotFather, use /newbot command, Set the name and username for your bot.
2: Use /mybots command and choose the bot you just created. Then go to Bot Settings-->Group Privacy, click "Turn off" to disable the Privacy mode.
3: After you turn on the privacy mode, Back to Settings-->Back to Bot, click "API Token" and copy it.
4: Back to @aknuserbot, click the button below then paste the I have got the API Token.
"""
keyboard_back = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
text="ποΈ I have got the API Token",
callback_data="meta_bot"
),
],
[
InlineKeyboardButton(
text="π New expiry",
callback_data="expiredtt"
),
],
[
InlineKeyboardButton(
text="β Cancel",
callback_data="customzie_bot"
)
]
]
)
await cb.edit_message_text(
check_tutorial,
disable_web_page_preview=True,
reply_markup=keyboard_back
)
@ren.on_callback_query(filters.regex("^tutorial_sesikntl$"))
async def tutor_sesikntl(_, cb: CallbackQuery):
user_id = cb.from_user.id
if not await db_client.get_privacy_policy(user_id):
return await cb.answer("You must agree to the privacy policy first.", True)
check_tutorial = """
<b> Tutorial bot token clone</b>
<b>Session Pyrogram & Telethon Bot</b>
It only takes a few minutes to activate your own unique bot with 0 coding:
1: Message @BotFather, use /newbot command, Set the name and username for your bot.
2: Use /mybots command and choose the bot you just created. Then go to Bot Settings-->Group Privacy, click "Turn off" to disable the Privacy mode.
3: After you turn on the privacy mode, Back to Settings-->Back to Bot, click "API Token" and copy it.
4: Back to @aknuserbot, click the button below then paste the I have got the API Token.
"""
keyboard_back = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
text="ποΈ I have got the API Token",
callback_data="sesikntl"
),
],
[
InlineKeyboardButton(
text="β Cancel",
callback_data="customzie_bot"
)
]
]
)
await cb.edit_message_text(
check_tutorial,
disable_web_page_preview=True,
reply_markup=keyboard_back
)
@ren.on_callback_query(filters.regex("^tutorial_yt$"))
async def tutor_yt(_, cb: CallbackQuery):
user_id = cb.from_user.id
if not await db_client.get_privacy_policy(user_id):
return await cb.answer("You must agree to the privacy policy first.", True)
check_tutorial = """
<b> Tutorial bot token clone</b>
<b>YouTube Downloader Bot</b>
It only takes a few minutes to activate your own unique bot with 0 coding:
1: Message @BotFather, use /newbot command, Set the name and username for your bot.
2: Use /mybots command and choose the bot you just created. Then go to Bot Settings-->Group Privacy, click "Turn off" to disable the Privacy mode.
3: After you turn on the privacy mode, Back to Settings-->Back to Bot, click "API Token" and copy it.
4: Back to @aknuserbot, click the button below then paste the I have got the API Token.
"""
keyboard_back = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
text="ποΈ I have got the API Token",
callback_data="yt_bot"
),
],
[
InlineKeyboardButton(
text="β Cancel",
callback_data="customzie_bot"
)
]
]
)
await cb.edit_message_text(
check_tutorial,
disable_web_page_preview=True,
reply_markup=keyboard_back
)
@ren.on_callback_query(filters.regex("^tutorial_captcha$"))
async def tutor_captcha(_, cb: CallbackQuery):
user_id = cb.from_user.id
if not await db_client.get_privacy_policy(user_id):
return await cb.answer("You must agree to the privacy policy first.", True)
check_tutorial = """
<b> Tutorial bot token clone</b>
<b>Approve Captcha Bot</b>
It only takes a few minutes to activate your own unique bot with 0 coding:
1: Message @BotFather, use /newbot command, Set the name and username for your bot.
2: Use /mybots command and choose the bot you just created. Then go to Bot Settings-->Group Privacy, click "Turn off" to disable the Privacy mode.
3: After you turn on the privacy mode, Back to Settings-->Back to Bot, click "API Token" and copy it.
4: Back to @aknuserbot, click the button below then paste the I have got the API Token.
"""
keyboard_back = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
text="ποΈ I have got the API Token",
callback_data="captcha_bot"
),
],
[
InlineKeyboardButton(
text="β Cancel",
callback_data="customzie_bot"
)
]
]
)
await cb.edit_message_text(
check_tutorial,
disable_web_page_preview=True,
reply_markup=keyboard_back
)
@ren.on_callback_query(filters.regex("^tutorial_alldlbot$"))
async def tutor_alldlbot(client, cb: CallbackQuery):
user_id = cb.from_user.id
if await db_client.get_maintance():
return await cb.answer("Bot is under maintenance, please try again later.", True)
if not await db_client.get_privacy_policy(user_id):
return await cb.answer("You must agree to the privacy policy first.", True)
check_tutorial = """
<b> Tutorial bot token clone</b>
<b>Azrea Bot</b>
It only takes a few minutes to activate your own unique bot with 0 coding:
1: Message @BotFather, use /newbot command, Set the name and username for your bot.
2: Use /mybots command and choose the bot you just created. Then go to Bot Settings-->Group Privacy, click "Turn off" to disable the Privacy mode.
3: After you turn on the privacy mode, Back to Settings-->Back to Bot, click "API Token" and copy it.
4: Back to @aknuserbot, click the button below then paste the I have got the API Token.
"""
keyboard_back = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
text="ποΈ I have got the API Token",
callback_data="alldl_bot"
),
],
[
InlineKeyboardButton(
text="π Manage Bots",
callback_data="my_bots"
),
],
[
InlineKeyboardButton(
text="β Cancel",
callback_data="customzie_bot"
)
]
]
)
await cb.edit_message_text(
check_tutorial,
disable_web_page_preview=True,
reply_markup=keyboard_back
)
|