MCPcopy Create free account
hub / github.com/VJBots/VJ-File-Store / delete_cloned_bot

Function delete_cloned_bot

plugins/clone.py:55–70  ·  view source on GitHub ↗
(client, message)

Source from the content-addressed store, hash-verified

53
54@Client.on_message(filters.command("deletecloned") & filters.private)
55async def delete_cloned_bot(client, message):
56 if CLONE_MODE == False:
57 return
58 try:
59 techvj = await client.ask(message.chat.id, "**Send Me Bot Token To Delete**")
60 bot_token = re.findall(r'\d[0-9]{8,10}:[0-9A-Za-z_-]{35}', techvj.text, re.IGNORECASE)
61 bot_token = bot_token[0] if bot_token else None
62 bot_id = re.findall(r'\d[0-9]{8,10}', techvj.text)
63 cloned_bot = mongo_db.bots.find_one({"token": bot_token})
64 if cloned_bot:
65 mongo_db.bots.delete_one({"token": bot_token})
66 await message.reply_text("**🤖 ᴛʜᴇ ᴄʟᴏɴᴇᴅ ʙᴏᴛ ʜᴀs ʙᴇᴇɴ ʀᴇᴍᴏᴠᴇᴅ ғʀᴏᴍ ᴛʜᴇ ʟɪsᴛ ᴀɴᴅ ɪᴛs ᴅᴇᴛᴀɪʟs ʜᴀᴠᴇ ʙᴇᴇɴ ʀᴇᴍᴏᴠᴇᴅ ғʀᴏᴍ ᴛʜᴇ ᴅᴀᴛᴀʙᴀsᴇ. ☠️**")
67 else:
68 await message.reply_text("**⚠️ ᴛʜᴇ ʙᴏᴛ ᴛᴏᴋᴇɴ ᴘʀᴏᴠɪᴅᴇᴅ ɪs ɴᴏᴛ ɪɴ ᴛʜᴇ ᴄʟᴏɴᴇᴅ ʟɪsᴛ.**")
69 except:
70 await message.reply_text("An error occurred while deleting the cloned bot.")
71
72# Don't Remove Credit Tg - @VJ_Bots
73# Subscribe YouTube Channel For Amazing Bot https://youtube.com/@Tech_VJ

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected