randydev commited on
Commit
3e53935
Β·
verified Β·
1 Parent(s): 9f81cdc
Files changed (1) hide show
  1. akn/manage/builderclone_bots.py +21 -6
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 AllDL Bot Request**\n\n"
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"AllDL Bot Request Error: {type(e).__name__} - {str(e)}")
160
  traceback.print_exc()
161
  await bot.send_message(
162
  chat_id,
163
- "⚠️ Please try again later.\n"
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"🚨 AllDL Bot Request Error\n\n"
172
  f"User: {user_mention} ({user_id})\n"
173
- f"Error: {type(e).__name__}\n"
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