randydev commited on
Commit
d39fbec
ยท
verified ยท
1 Parent(s): 0b7b6f2

Upload callback.py

Browse files
Files changed (1) hide show
  1. akn/manage/callback.py +41 -10
akn/manage/callback.py CHANGED
@@ -30,6 +30,31 @@ from akn import gemini_bot_id
30
 
31
  from box import Box
32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  PYTHON_COHERE = """
34
  ```py
35
  import json
@@ -82,7 +107,7 @@ Before making a fuss, make sure you understand the situation first. Answer prope
82
  """
83
 
84
  CUSTOM_KEY = """
85
- ๐ŸŒŸ **Welcome to AkenoX API!** ๐ŸŒŸ
86
 
87
  Weโ€™re excited to have you here! Hereโ€™s what you can enjoy:
88
 
@@ -334,6 +359,10 @@ async def cb_custom_key(client, query):
334
  reply_markup=keyboard_back
335
  )
336
 
 
 
 
 
337
  @ren.on_callback_query(filters.regex("run_cohere"))
338
  async def cb_run_cohere(client, query):
339
  user_id = query.from_user.id
@@ -357,7 +386,7 @@ async def cb_run_cohere(client, query):
357
  ).json()
358
  if response_two.get("results") is None:
359
  return await query.answer("API key is expired", True)
360
- return await query.answer(response_two, True)
361
  else:
362
  return await query.answer("Error api try again", True)
363
 
@@ -450,7 +479,7 @@ async def cb_new_revokekey(client, query):
450
  [
451
  [
452
  InlineKeyboardButton(
453
- "API Key",
454
  copy_text=api_key
455
  ),
456
  InlineKeyboardButton(
@@ -520,13 +549,17 @@ async def cb_new_keyprem(client, query):
520
  [
521
  [
522
  InlineKeyboardButton(
523
- "API Key",
524
  copy_text=api_key
 
 
 
 
525
  )
526
  ],
527
  [
528
  InlineKeyboardButton(
529
- "Example Cohere",
530
  callback_data="example_cohere"
531
  )
532
  ],
@@ -610,7 +643,7 @@ async def cb_new_key(client, query):
610
  [
611
  [
612
  InlineKeyboardButton(
613
- "API Key",
614
  copy_text=api_key
615
  ),
616
  InlineKeyboardButton(
@@ -858,8 +891,6 @@ async def confirm_userbot_str(_, cb: CallbackQuery):
858
  if not await db_client.get_privacy_policy(user_id):
859
  return await cb.answer("You must agree to the privacy policy first.", True)
860
 
861
- bot = "https://t.me/randydev_bot"
862
- death = "https://t.me/RendyProjects/1371"
863
  keyboard_confirm = InlineKeyboardMarkup(
864
  [
865
  [
@@ -883,7 +914,7 @@ async def confirm_userbot_str(_, cb: CallbackQuery):
883
  ]
884
  )
885
  await cb.edit_message_text(
886
- CONFIRM_USERBOT.format(death, bot),
887
  disable_web_page_preview=True,
888
  reply_markup=keyboard_confirm
889
  )
@@ -1361,4 +1392,4 @@ It only takes a few minutes to activate your own unique bot with 0 coding:
1361
  check_tutorial,
1362
  disable_web_page_preview=True,
1363
  reply_markup=keyboard_back
1364
- )
 
30
 
31
  from box import Box
32
 
33
+ USERBOT_UPDATE_TEXT = """
34
+ **Akeno Userbot**
35
+
36
+ ๐Ÿš€ **New Features:**
37
+ - Unlimited real-time userbot operation
38
+ - Enhanced session management
39
+ - Improved stability and performance
40
+
41
+ ๐Ÿ”’ **Usage Guidelines:**
42
+ 1. Legal use only (no spam/scams)
43
+ 2. Respect Telegram's ToS
44
+ 3. No unauthorized promotions
45
+
46
+ โš ๏ธ **Important Notice:**
47
+ Misuse including (but not limited to):
48
+ - Illegal automation
49
+ - Group spamming
50
+ - Fake engagement schemes
51
+ May lead to:
52
+ โ–ธ Permanent account bans
53
+ โ–ธ Service blacklisting
54
+
55
+ ๐Ÿ“† Last Updated: 24-04-2025
56
+ """
57
+
58
  PYTHON_COHERE = """
59
  ```py
60
  import json
 
107
  """
108
 
109
  CUSTOM_KEY = """
110
+ **Welcome to AkenoX API!**
111
 
112
  Weโ€™re excited to have you here! Hereโ€™s what you can enjoy:
113
 
 
359
  reply_markup=keyboard_back
360
  )
361
 
362
+ @ren.on_callback_query(filters.regex("api_key_upgraded"))
363
+ async def cb_api_key_upgraded(client, query):
364
+ return await query.answer("You can ask the developer support", True)
365
+
366
  @ren.on_callback_query(filters.regex("run_cohere"))
367
  async def cb_run_cohere(client, query):
368
  user_id = query.from_user.id
 
386
  ).json()
387
  if response_two.get("results") is None:
388
  return await query.answer("API key is expired", True)
389
+ return await query.answer(response_two.get("results"), True)
390
  else:
391
  return await query.answer("Error api try again", True)
392
 
 
479
  [
480
  [
481
  InlineKeyboardButton(
482
+ "๐Ÿ”‘ API Key",
483
  copy_text=api_key
484
  ),
485
  InlineKeyboardButton(
 
549
  [
550
  [
551
  InlineKeyboardButton(
552
+ "๐Ÿ”‘ API Key",
553
  copy_text=api_key
554
+ ),
555
+ InlineKeyboardButton(
556
+ "๐Ÿ” Update Expired",
557
+ callback_data="api_key_upgraded"
558
  )
559
  ],
560
  [
561
  InlineKeyboardButton(
562
+ "โ“ Example Cohere",
563
  callback_data="example_cohere"
564
  )
565
  ],
 
643
  [
644
  [
645
  InlineKeyboardButton(
646
+ "๐Ÿ”‘ API Key",
647
  copy_text=api_key
648
  ),
649
  InlineKeyboardButton(
 
891
  if not await db_client.get_privacy_policy(user_id):
892
  return await cb.answer("You must agree to the privacy policy first.", True)
893
 
 
 
894
  keyboard_confirm = InlineKeyboardMarkup(
895
  [
896
  [
 
914
  ]
915
  )
916
  await cb.edit_message_text(
917
+ USERBOT_UPDATE_TEXT,
918
  disable_web_page_preview=True,
919
  reply_markup=keyboard_confirm
920
  )
 
1392
  check_tutorial,
1393
  disable_web_page_preview=True,
1394
  reply_markup=keyboard_back
1395
+ )