randydev commited on
Commit
b7b28b1
·
1 Parent(s): cfe798b
akn/manage/account.py CHANGED
@@ -101,11 +101,6 @@ Username : {}
101
  """
102
 
103
  NOT_ALLOWED_NON_PROGRAMMER = [
104
- 466019692, # @myexcid,
105
- 1423479724, # tonic,
106
- 883761960, # ari
107
- 6824458358, # None
108
- 1982318761, # paman
109
  5575183435, #suku
110
  948247711, # akay
111
  ]
@@ -620,7 +615,19 @@ async def start_welcome(client: Client, message: Message):
620
  user_id = message.from_user.id
621
  if user_id in NOT_ALLOWED_NON_PROGRAMMER:
622
  return
623
- referrer_id = 0
 
 
 
 
 
 
 
 
 
 
 
 
624
  try:
625
  if len(message.text.split()) > 1:
626
  name = (message.text.split(None, 1)[1]).lower()
@@ -1973,7 +1980,7 @@ async def userbot_new(bot: Client, cb: CallbackQuery, tiktok=False):
1973
  )
1974
  except Exception as e:
1975
  return await bot.send_message(
1976
- chat.id, "**ERROR:** `{}`.".format(e), reply_markup=bttn_back
1977
  )
1978
  try:
1979
  await client.connect()
 
101
  """
102
 
103
  NOT_ALLOWED_NON_PROGRAMMER = [
 
 
 
 
 
104
  5575183435, #suku
105
  948247711, # akay
106
  ]
 
615
  user_id = message.from_user.id
616
  if user_id in NOT_ALLOWED_NON_PROGRAMMER:
617
  return
618
+ if not await db_client.get_privacy_policy(user_id):
619
+ await message.reply_text(
620
+ "You need to accept the privacy policy to use this bot.\n\n"
621
+ "Press /start to accept the privacy policy.",
622
+ reply_markup=InlineKeyboardMarkup(
623
+ [
624
+ [
625
+ InlineKeyboardButton("Privacy Policy", callback_data="privacy_policy")
626
+ ]
627
+ ]
628
+ )
629
+ )
630
+ return
631
  try:
632
  if len(message.text.split()) > 1:
633
  name = (message.text.split(None, 1)[1]).lower()
 
1980
  )
1981
  except Exception as e:
1982
  return await bot.send_message(
1983
+ chat.id, "**ERROR:** `{}`.".format(e)
1984
  )
1985
  try:
1986
  await client.connect()
akn/manage/callback.py CHANGED
@@ -6,6 +6,7 @@ import asyncio
6
  import os
7
  import pyromod
8
  import random
 
9
  import requests
10
  from asyncio.exceptions import TimeoutError
11
  from random import choice
@@ -124,6 +125,32 @@ AkenoX API Key Generated
124
  ⚠️ **Warning:** Do not share this token with anyone!
125
  """
126
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  @ren.on_callback_query(filters.regex("^custom_ban"))
128
  async def cb_custom_bans(client, query):
129
  keyboard_back = InlineKeyboardMarkup(
 
6
  import os
7
  import pyromod
8
  import random
9
+ from secure import SECURETY
10
  import requests
11
  from asyncio.exceptions import TimeoutError
12
  from random import choice
 
125
  ⚠️ **Warning:** Do not share this token with anyone!
126
  """
127
 
128
+ @ren.on_callback_query(filters.regex("^aggrement"))
129
+ async def aggrement_ok(client, query):
130
+ await query.message.delete()
131
+ await db_client.claim_privacy_policy(query.from_user.id)
132
+ await client.send_message(
133
+ query.from_user.id,
134
+ "You have agreed to the privacy policy, you can now use the bot."
135
+ )
136
+
137
+ @ren.on_callback_query(filters.regex("^privacy_policy"))
138
+ async def privacy_policy_ok(client, query):
139
+ keyboard_back = InlineKeyboardMarkup(
140
+ [
141
+ [
142
+ InlineKeyboardButton(
143
+ "Your Aggrement",
144
+ callback_data="aggrement"
145
+ ),
146
+ ]
147
+ ]
148
+ )
149
+ await query.edit_message_text(
150
+ text=SECURETY,
151
+ reply_markup=keyboard_back
152
+ )
153
+
154
  @ren.on_callback_query(filters.regex("^custom_ban"))
155
  async def cb_custom_bans(client, query):
156
  keyboard_back = InlineKeyboardMarkup(
akn/utils/database.py CHANGED
@@ -52,6 +52,7 @@ class Database:
52
  self.session_bot = self.db_tiktok["sessionbot"]
53
  self.captcha_bot = self.db_tiktok["captchabot"]
54
  self.alldl_bot = self.db_tiktok["alldlbot"]
 
55
 
56
  # akeno
57
  self.afk = self.db["afk"]
@@ -90,7 +91,18 @@ class Database:
90
 
91
  def get_datetime(self) -> str:
92
  return datetime.datetime.now().strftime("%d/%m/%Y - %H:%M")
 
 
 
 
 
 
 
93
 
 
 
 
 
94
  async def remove_bot_token_magic(self, user_id):
95
  remove_bot_clone = {
96
  "bot_token": None,
 
52
  self.session_bot = self.db_tiktok["sessionbot"]
53
  self.captcha_bot = self.db_tiktok["captchabot"]
54
  self.alldl_bot = self.db_tiktok["alldlbot"]
55
+ self.privary_bot = self.db_tiktok["privarybot"]
56
 
57
  # akeno
58
  self.afk = self.db["afk"]
 
91
 
92
  def get_datetime(self) -> str:
93
  return datetime.datetime.now().strftime("%d/%m/%Y - %H:%M")
94
+
95
+ async def claim_privacy_policy(self, user_id):
96
+ return await self.privary_bot.update_one(
97
+ {"user_id": user_id},
98
+ {"$set": {"is_claimed": True}},
99
+ upsert=True
100
+ )
101
 
102
+ async def get_privacy_policy(self, user_id):
103
+ user_data = await self.privary_bot.find_one({"user_id": user_id})
104
+ return user_data.get("is_claimed") if user_data else None
105
+
106
  async def remove_bot_token_magic(self, user_id):
107
  remove_bot_clone = {
108
  "bot_token": None,
secure.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ SECURETY = """"
2
+ **Telegram Privacy Policy Compliance – AKN-DEV**
3
+
4
+ @aknuserbot fully complies with Telegram's privacy policy and ensures user security and data protection.
5
+
6
+ • **What is AKN-DEV?**
7
+ AKN-DEV is a powerful and versatile tool designed to enhance your Telegram experience. Whether you need a custom bot clone, a userbot, or a new API key, we’ve got you covered!
8
+
9
+ • **Your Privacy & Security**
10
+ - **Akeno Userbot:** You have full control over your session. You can revoke any session directly from Telegram and redeploy it anytime.
11
+
12
+ - **Bot Clones:** If you create a bot using @aknuserbot, you can revoke access anytime via BotFather.
13
+
14
+ - **API Keys:** API keys are securely managed and can be regenerated at any time.
15
+
16
+ • **Full Compliance with Telegram Policies**
17
+ Rest assured, AKN-DEV follows all Telegram privacy policies to ensure the safety and security of your data. Your sessions, bot tokens, and API keys remain private and secure.
18
+
19
+ 🔒 Your privacy and security are our top priority
20
+ """