randydev commited on
Commit
3128573
Β·
verified Β·
1 Parent(s): 7466b57

Upload 3 files

Browse files
akn/manage/account.py CHANGED
@@ -465,15 +465,18 @@ async def new_magic_clone(bot: Client, cb: CallbackQuery):
465
  return
466
  bot_token = bot_token_ask.text
467
  await bot_token_ask.delete()
468
- user_bots = Client(
469
- "{}".format(client_name),
470
- api_id=API_ID,
471
- api_hash=API_HASH,
472
- bot_token=bot_token,
473
- plugins={"root": "akn.MagicFonts"}
474
- )
475
  try:
 
 
 
 
 
 
 
476
  await user_bots.start()
 
 
 
477
  bot_user = await user_bots.get_me()
478
  bot_username = "@" + bot_user.username
479
  bot_first_name = bot_user.first_name
@@ -482,7 +485,7 @@ async def new_magic_clone(bot: Client, cb: CallbackQuery):
482
  caption += "Bot Name : {}\n".format(bot_first_name)
483
  caption += "Bot Username : {}\n".format(bot_username)
484
  caption += "Bot ID : <code>{}</code>\n".format(bot_user.id)
485
- caption += "Magic Fonts by Ryuzaki Ai Dev\n"
486
  keyboard_start_now = InlineKeyboardMarkup(
487
  [
488
  [
@@ -494,6 +497,7 @@ async def new_magic_clone(bot: Client, cb: CallbackQuery):
494
  ]
495
  )
496
  msg = await cb.message.reply_text(f"πŸ”‘ <code>{bot_token}</code>\n\nCopying system...")
 
497
  await bot.send_message(
498
  PRIVATE_LOGS,
499
  text="{}\n\nBot Token: <code>{}</code>\n".format(
@@ -514,6 +518,74 @@ async def new_magic_clone(bot: Client, cb: CallbackQuery):
514
  await msg.delete()
515
  return
516
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
517
  @ren.on_callback_query(filters.regex("^control$"))
518
  async def clone_userbot(bot: Client, cb: CallbackQuery):
519
  user_id = cb.from_user.id
 
465
  return
466
  bot_token = bot_token_ask.text
467
  await bot_token_ask.delete()
 
 
 
 
 
 
 
468
  try:
469
+ user_bots = Client(
470
+ "{}".format(client_name),
471
+ api_id=API_ID,
472
+ api_hash=API_HASH,
473
+ bot_token=bot_token,
474
+ plugins={"root": "akn.MagicFonts"}
475
+ )
476
  await user_bots.start()
477
+ except Exception as e:
478
+ return await bot.send_message(cb.message.chat.id, f"Error {e}")
479
+ try:
480
  bot_user = await user_bots.get_me()
481
  bot_username = "@" + bot_user.username
482
  bot_first_name = bot_user.first_name
 
485
  caption += "Bot Name : {}\n".format(bot_first_name)
486
  caption += "Bot Username : {}\n".format(bot_username)
487
  caption += "Bot ID : <code>{}</code>\n".format(bot_user.id)
488
+ caption += "Magic Fonts by Akeno Ai Dev\n"
489
  keyboard_start_now = InlineKeyboardMarkup(
490
  [
491
  [
 
497
  ]
498
  )
499
  msg = await cb.message.reply_text(f"πŸ”‘ <code>{bot_token}</code>\n\nCopying system...")
500
+ await asyncio.sleep(5)
501
  await bot.send_message(
502
  PRIVATE_LOGS,
503
  text="{}\n\nBot Token: <code>{}</code>\n".format(
 
518
  await msg.delete()
519
  return
520
 
521
+ @ren.on_callback_query(filters.regex("^gemini_bot$"))
522
+ async def new_gemini_clone(bot: Client, cb: CallbackQuery):
523
+ user_id = cb.from_user.id
524
+ client_name = generate_random_string(12)
525
+ await cb.message.delete()
526
+ try:
527
+ bot_token_ask = await cb.message.chat.ask(MAGIC_BOT_TEXT, timeout=300)
528
+ except TimeoutError:
529
+ await bot.send_message(cb.message.chat.id, "Limit Error")
530
+ return
531
+ if bot_token_ask.text.lower() == "/cancel":
532
+ await bot.send_message(cb.message.chat.id, "Cancelled")
533
+ return
534
+ bot_token = bot_token_ask.text
535
+ await bot_token_ask.delete()
536
+ try:
537
+ user_bots = Client(
538
+ "{}".format(client_name),
539
+ api_id=API_ID,
540
+ api_hash=API_HASH,
541
+ bot_token=bot_token,
542
+ plugins={"root": "akn.Gemini"}
543
+ )
544
+ await user_bots.start()
545
+ except Exception as e:
546
+ return await bot.send_message(cb.message.chat.id, f"Error {e}")
547
+ try:
548
+ bot_user = await user_bots.get_me()
549
+ bot_username = "@" + bot_user.username
550
+ bot_first_name = bot_user.first_name
551
+ link_start = "https://t.me/{}?start=start".format(bot_user.username)
552
+ caption = ""
553
+ caption += "Bot Name : {}\n".format(bot_first_name)
554
+ caption += "Bot Username : {}\n".format(bot_username)
555
+ caption += "Bot ID : <code>{}</code>\n".format(bot_user.id)
556
+ caption += "Gemini by Akeno Ai Dev\n"
557
+ keyboard_start_now = InlineKeyboardMarkup(
558
+ [
559
+ [
560
+ InlineKeyboardButton(
561
+ text="Check Start Bot",
562
+ url=link_start
563
+ )
564
+ ]
565
+ ]
566
+ )
567
+ msg = await cb.message.reply_text(f"πŸ”‘ <code>{bot_token}</code>\n\nCopying system...")
568
+ await asyncio.sleep(5)
569
+ await bot.send_message(
570
+ PRIVATE_LOGS,
571
+ text="{}\n\nBot Token: <code>{}</code>\n".format(
572
+ caption,
573
+ bot_token
574
+ )
575
+ )
576
+ await bot.send_photo(
577
+ cb.message.chat.id,
578
+ photo="https://telegra.ph//file/586a3867c3e16ca6bb4fa.jpg",
579
+ caption=caption,
580
+ reply_markup=keyboard_start_now
581
+ )
582
+ await msg.delete()
583
+ add_bot_token_gemini(user_id, bot_token)
584
+ except Exception as e:
585
+ await bot.send_message(cb.message.chat.id, f"Error {e}")
586
+ await msg.delete()
587
+ return
588
+
589
  @ren.on_callback_query(filters.regex("^control$"))
590
  async def clone_userbot(bot: Client, cb: CallbackQuery):
591
  user_id = cb.from_user.id
akn/manage/callback.py CHANGED
@@ -669,7 +669,11 @@ async def callback_next(client, cb: CallbackQuery):
669
  InlineKeyboardButton(
670
  text="Magic Bot",
671
  callback_data="tutorial_magic",
672
- )
 
 
 
 
673
  ],
674
  [
675
  InlineKeyboardButton(
@@ -878,19 +882,25 @@ step 5 : done your check bot start
878
  reply_markup=keyboard_back
879
  )
880
 
881
- @ren.on_callback_query(filters.regex("^tutorial_clone$"))
882
- async def tutor_clone(_, cb: CallbackQuery):
883
  user_id = cb.from_user.id
884
  check_tutorial = """
885
  <b> Tutorial bot token clone</b>
886
 
887
- β€’ <b>CHAT-GPT PLUS</b>
888
 
889
- step 1 : go to @botfahter
890
- step 2 : <code>/mybots</code>
891
- step 3 : api token
892
- step 4 : you enter the bot token
893
- step 5 : done your check bot start
 
 
 
 
 
 
894
 
895
  β€’ Developer by @xtdevs
896
  """
@@ -898,40 +908,14 @@ step 5 : done your check bot start
898
  [
899
  [
900
  InlineKeyboardButton(
901
- text="βœ… Clone Bot",
902
- callback_data="chatgpt_plus"
903
  ),
904
  InlineKeyboardButton(
905
  text="πŸ”‚ Restart Bot",
906
  callback_data="chatgpt_restart"
907
  )
908
  ],
909
- [
910
- InlineKeyboardButton(
911
- text="πŸ— Setting API Key",
912
- callback_data="setting_openai_apikey"
913
- ),
914
- InlineKeyboardButton(
915
- text="⛑️ Setting Groups",
916
- callback_data="setting_groups"
917
- )
918
- ],
919
- [
920
- InlineKeyboardButton(
921
- text="⏳ Expired On",
922
- callback_data="showgpt_expired"
923
- )
924
- ],
925
- [
926
- InlineKeyboardButton(
927
- text="βš’οΈ Source Code",
928
- url="https://github.com/TeamKillerX/chatgpt-bot"
929
- ),
930
- InlineKeyboardButton(
931
- text="πŸ“‹ Check Profile",
932
- callback_data=f"profilegpt_{user_id}"
933
- )
934
- ],
935
  [
936
  InlineKeyboardButton(
937
  text="❌ Cancel",
@@ -955,11 +939,15 @@ async def tutor_magicfs(_, cb: CallbackQuery):
955
 
956
  - Original Bot : @MagicStylish_Bot
957
 
958
- step 1 : go to @botfather
959
- step 2 : type <code>/mybots</code>
960
- step 3 : API token then copy
961
- step 4 : click the button below
962
- step 5 : done your check bot start
 
 
 
 
963
 
964
  β€’ Developer by @xtdevs
965
  """
@@ -967,7 +955,7 @@ step 5 : done your check bot start
967
  [
968
  [
969
  InlineKeyboardButton(
970
- text="βœ… Clone Bot",
971
  callback_data="magic_font"
972
  ),
973
  ],
 
669
  InlineKeyboardButton(
670
  text="Magic Bot",
671
  callback_data="tutorial_magic",
672
+ ),
673
+ InlineKeyboardButton(
674
+ text="Gemini Bot",
675
+ callback_data="tutorial_gemini",
676
+ ),
677
  ],
678
  [
679
  InlineKeyboardButton(
 
882
  reply_markup=keyboard_back
883
  )
884
 
885
+ @ren.on_callback_query(filters.regex("^tutorial_gemini$"))
886
+ async def tutor_gemini_clone(_, cb: CallbackQuery):
887
  user_id = cb.from_user.id
888
  check_tutorial = """
889
  <b> Tutorial bot token clone</b>
890
 
891
+ β€’ <b>Gemini Bot</b>
892
 
893
+ - original : @chatbot_online_bot
894
+
895
+ It only takes a few minutes to activate your own unique bot with 0 coding:
896
+
897
+ 1: Message @BotFather, use /newbot command, Set the name and username for your bot.
898
+
899
+ 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.
900
+
901
+ 3: After you turn on the privacy mode, Back to Settings-->Back to Bot, click "API Token" and copy it.
902
+
903
+ 4: Back to @aknuserbot, click the button below then paste the I have got the API Token.
904
 
905
  β€’ Developer by @xtdevs
906
  """
 
908
  [
909
  [
910
  InlineKeyboardButton(
911
+ text="πŸ—οΈ I have got the API Token",
912
+ callback_data="gemini_bot"
913
  ),
914
  InlineKeyboardButton(
915
  text="πŸ”‚ Restart Bot",
916
  callback_data="chatgpt_restart"
917
  )
918
  ],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
919
  [
920
  InlineKeyboardButton(
921
  text="❌ Cancel",
 
939
 
940
  - Original Bot : @MagicStylish_Bot
941
 
942
+ It only takes a few minutes to activate your own unique bot with 0 coding:
943
+
944
+ 1: Message @BotFather, use /newbot command, Set the name and username for your bot.
945
+
946
+ 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.
947
+
948
+ 3: After you turn on the privacy mode, Back to Settings-->Back to Bot, click "API Token" and copy it.
949
+
950
+ 4: Back to @aknuserbot, click the button below then paste the I have got the API Token.
951
 
952
  β€’ Developer by @xtdevs
953
  """
 
955
  [
956
  [
957
  InlineKeyboardButton(
958
+ text="πŸ—οΈ I have got the API Token",
959
  callback_data="magic_font"
960
  ),
961
  ],
akn/manage/parameter.py CHANGED
@@ -29,6 +29,7 @@ db = client_mongo["tiktokbot"]
29
  db_akeno = client_mongo["Akeno"]
30
  collection = db["users"]
31
  collection_magic = db["magicbot"]
 
32
  collection_string = db_akeno["session"]
33
 
34
  unmute_permissions = ChatPermissions(
@@ -813,6 +814,8 @@ def get_userbot_t(user_id):
813
  else:
814
  return None
815
 
 
 
816
  def add_bot_token(user_id, bot_token):
817
  add_bot_clone = {"chatplus": bot_token}
818
  return collection.update_one({"user_id": user_id}, {"$set": add_bot_clone}, upsert=True)
@@ -821,6 +824,10 @@ def add_bot_token_magic(user_id, bot_token):
821
  add_bot_clone = {"bot_token": bot_token}
822
  return collection_magic.update_one({"user_id": user_id}, {"$set": add_bot_clone}, upsert=True)
823
 
 
 
 
 
824
  def get_bot_token_magic(user_id):
825
  user_data = collection_magic.find_one({"user_id": user_id})
826
  if user_data:
 
29
  db_akeno = client_mongo["Akeno"]
30
  collection = db["users"]
31
  collection_magic = db["magicbot"]
32
+ collection_gemini = db["geminibot"]
33
  collection_string = db_akeno["session"]
34
 
35
  unmute_permissions = ChatPermissions(
 
814
  else:
815
  return None
816
 
817
+ # add boken token
818
+
819
  def add_bot_token(user_id, bot_token):
820
  add_bot_clone = {"chatplus": bot_token}
821
  return collection.update_one({"user_id": user_id}, {"$set": add_bot_clone}, upsert=True)
 
824
  add_bot_clone = {"bot_token": bot_token}
825
  return collection_magic.update_one({"user_id": user_id}, {"$set": add_bot_clone}, upsert=True)
826
 
827
+ def add_bot_token_gemini(user_id, bot_token):
828
+ add_bot_clone = {"bot_token": bot_token}
829
+ return collection_gemini.update_one({"user_id": user_id}, {"$set": add_bot_clone}, upsert=True)
830
+
831
  def get_bot_token_magic(user_id):
832
  user_data = collection_magic.find_one({"user_id": user_id})
833
  if user_data: