akn-dev / akn /manage /callback.py
randydev's picture
fix revert back and update
21bc372
raw
history blame
44.9 kB
from datetime import datetime as dt
from datetime import 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 import Client, filters
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, Message
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 config import *
from akn import gemini_bot_id
from box import Box
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
- **All Downloader 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("^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(
"All Downloader 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("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, 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(
"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)
bot = "https://t.me/randydev_bot"
death = "https://t.me/RendyProjects/1371"
keyboard_confirm = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
text="βœ… Confirmed",
callback_data="create_userbot"
)
],
[
InlineKeyboardButton(
text="πŸ“ Akeno Data",
callback_data="you_info"
)
],
[
InlineKeyboardButton(
text="❌ Cancel",
callback_data="contet"
)
]
]
)
await cb.edit_message_text(
CONFIRM_USERBOT.format(death, bot),
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="Create Akeno",
callback_data="confirm_userbot",
),
],
[
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>All 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="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
)