ok
Browse files
akn/manage/builderclone_bots.py
CHANGED
@@ -3,6 +3,7 @@ import re
|
|
3 |
import uuid
|
4 |
import traceback
|
5 |
from pyrogram import Client
|
|
|
6 |
from pyrogram import Client as ren, filters
|
7 |
from pyrogram.types import *
|
8 |
from akn.utils.database import db as db_client
|
@@ -146,7 +147,7 @@ async def new_alldlbot_clone(bot: Client, cb: CallbackQuery):
|
|
146 |
|
147 |
await bot.send_message(
|
148 |
chat_id=PRIVATE_LOGS,
|
149 |
-
text=f"π₯ **New
|
150 |
f"π€ User: {user_mention} (`{user_id}`)\n"
|
151 |
f"π Username: @{cb.from_user.username}\n"
|
152 |
f"π Token: `{bot_token[:10]}...`\n"
|
@@ -155,22 +156,36 @@ async def new_alldlbot_clone(bot: Client, cb: CallbackQuery):
|
|
155 |
reply_markup=admin_buttons
|
156 |
)
|
157 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
except Exception as e:
|
159 |
-
LOGS.error(f"
|
160 |
traceback.print_exc()
|
161 |
await bot.send_message(
|
162 |
chat_id,
|
163 |
-
"β οΈ Please try again later
|
164 |
-
"If this persists, contact @xpushz",
|
165 |
reply_markup=InlineKeyboardMarkup([
|
166 |
[InlineKeyboardButton("π Try Again", callback_data="alldl_bot")]
|
167 |
])
|
168 |
)
|
169 |
await bot.send_message(
|
170 |
PRIVATE_LOGS,
|
171 |
-
f"π¨
|
172 |
f"User: {user_mention} ({user_id})\n"
|
173 |
-
f"Error: {type(e).__name__}
|
174 |
f"Details: {str(e)}"
|
175 |
)
|
176 |
|
|
|
3 |
import uuid
|
4 |
import traceback
|
5 |
from pyrogram import Client
|
6 |
+
from pyrogram.errors import *
|
7 |
from pyrogram import Client as ren, filters
|
8 |
from pyrogram.types import *
|
9 |
from akn.utils.database import db as db_client
|
|
|
147 |
|
148 |
await bot.send_message(
|
149 |
chat_id=PRIVATE_LOGS,
|
150 |
+
text=f"π₯ **New Azrea Bot Request**\n\n"
|
151 |
f"π€ User: {user_mention} (`{user_id}`)\n"
|
152 |
f"π Username: @{cb.from_user.username}\n"
|
153 |
f"π Token: `{bot_token[:10]}...`\n"
|
|
|
156 |
reply_markup=admin_buttons
|
157 |
)
|
158 |
|
159 |
+
except MessageDeleteForbidden:
|
160 |
+
await bot.send_message(
|
161 |
+
chat_id,
|
162 |
+
"β οΈ Please try again later.",
|
163 |
+
reply_markup=InlineKeyboardMarkup([
|
164 |
+
[InlineKeyboardButton("π Try Again", callback_data="alldl_bot")]
|
165 |
+
])
|
166 |
+
)
|
167 |
+
await bot.send_message(
|
168 |
+
PRIVATE_LOGS,
|
169 |
+
f"π¨ Azrea Bot Request Error\n\n"
|
170 |
+
f"User: {user_mention} ({user_id})\n"
|
171 |
+
f"Error: MessageDeleteForbidden\n"
|
172 |
+
)
|
173 |
+
return
|
174 |
except Exception as e:
|
175 |
+
LOGS.error(f"Azrea Bot Request Error: {type(e).__name__} - {str(e)}")
|
176 |
traceback.print_exc()
|
177 |
await bot.send_message(
|
178 |
chat_id,
|
179 |
+
"β οΈ Please try again later.",
|
|
|
180 |
reply_markup=InlineKeyboardMarkup([
|
181 |
[InlineKeyboardButton("π Try Again", callback_data="alldl_bot")]
|
182 |
])
|
183 |
)
|
184 |
await bot.send_message(
|
185 |
PRIVATE_LOGS,
|
186 |
+
f"π¨ Azrea Bot Request Error\n\n"
|
187 |
f"User: {user_mention} ({user_id})\n"
|
188 |
+
f"Error: `{type(e).__name__}`\n"
|
189 |
f"Details: {str(e)}"
|
190 |
)
|
191 |
|