BotVerse by Ravi
157 subscribers
32 photos
4 videos
4 files
63 links
Explore the BotVerse! Updates, insights, and creations from Ravi's world of bots.

Support Chat: @BotVerseRaviSupport
Support Bot: @BotVerseRavi_bot

t.me/boost/BotVerseRavi
Download Telegram
Reels Downloader [TPY Script]


Command: *

# Posted by @BotVerseRavi on Telegram

bot.sendChatAction(chat_id=message.chat.id, action="upload_video")

# Command: * (Wildcard to handle Instagram URL)
instagram_url = message.text
api_url = f"https://instagram-api-botverseravi.gt.tc/api.php/?url={instagram_url}"

try:
response = HTTP.get(api_url, proxy=True)
response.raise_for_status()
data = bunchify(response.json())

if data.statusCode == 200 and data.url:
video_url = data.medias[0].url #Accessing to .url inside the response

bot.sendVideo(
chat_id=message.chat.id,
video=video_url,
caption=f"<b>{data.title}</b>", #Adding Caption Here" ,
parse_mode="HTML"
)


else:
bot.sendMessage(
chat_id=message.chat.id,
text=" Sorry, I couldn't download the video. Please make sure the link is correct and the video is publicly available."
)


except Exception:
bot.sendMessage(
chat_id=message.chat.id,
text=" An error occurred while processing the video. Please try again later."
)

bot.sendChatAction(chat_id=message.chat.id, action="typing")


API Info: Click here

👨🏻‍💻 Posted by @BotVerseRavi


📢 Share this channel with your friends and remember to give credit if you use it on your channel!
🔥21🤩1🤝1
🛡 Handling “Message too long” Error

✏️ Telegram allows sending a Text message of max 4096 characters by bot

💡 Send Message in multiple messages chunks.

Here is the BJS code to do that:
// Posted by @BotVerseRavi
let chatId = chat.chatid; // Replace with chat id
let message = 'Long Message to send…'; // Replace with the long message

// Function to split a long message into smaller pieces/chunks
function splitMessage(message, maxLength = 4096) {
  let chunks = []

  // Split the message in multiple chunks each of max 4096 characters
  for (let i = 0; i < message.length; i += maxLength) {
    chunks.push(message.substring(i, Math.min(message.length, i + maxLength)))
  }

  return chunks;
}

// Function to send a long message in smaller pieces
function sendMessageInChunks(chatId, text) {
  // split the message into chunks
  var chunks = splitMessage(text)

  // Send the pieces of chunks one after other
  for (let i = 0; i < chunks.length; i++) {
    Api.sendMessage({ chat_id: chatId, text: chunks[i] })
  }
}

// Send the message in pieces
sendMessageInChunks(chatId, message)


❗️ Only use in state of high requirement, else BB server may get load.


👨🏻‍💻 Posted by @BotVerseRavi


📢 Share this channel with your friends and remember to give credit if you use it on your channel!
1🔥1🥰1🤩1
🤖 Vehicle Information Extraction [TPY]


Note: Combine both parts in the command, otherwise it won't function.

Part 1


# Posted by @BotVerseRavi
try:
args = msg.split(" ", 1)

# Check correct usage
if len(args) != 2:
bot.sendMessage(
" <b>Invalid format!</b>

"
"Use the correct format:
"
"<code>/rc VEHICLE_NUMBER</code>

"
" Example:
"
"<code>/rc KL43G1669</code>",
parse_mode="HTML"
)
raise ReturnCommand()

rc_number = args[1].strip().upper()

# Validate basic RC format
if len(rc_number) < 6 or len(rc_number) > 12:
bot.sendMessage(
f"⚠️ <b>Invalid Vehicle Number:</b> <code>{rc_number}</code>
"
"Please provide a valid RC format like <b>KL43G1669</b>.",
parse_mode="HTML"
)
raise ReturnCommand()

bot.sendChatAction("typing")

# 🌐 API Call
api_url = f"https://vehicle-eight-vert.vercel.app/api?rc={rc_number}"
res = HTTP.get(api_url, timeout=20)
data = res.json()

# Check data validity
details = data.get("details")
if not details:
bot.sendMessage(
f" No records found for <b>{rc_number}</b>.
Please verify the RC number and try again.",
parse_mode="HTML"
)
raise ReturnCommand()


Part 2: https://t.me/BotVerseRavi/271
1👍1🔥1😁1🏆1🤝1
Part 2


# Posted by @BotVerseRavi
# Extract details
owner = details.get("Owner Name", "N/A")
model = details.get("Maker Model", "N/A")
fuel = details.get("Fuel Type", "N/A")
reg_date = details.get("Registration Date", "N/A")
rto = details.get("Registered RTO", "N/A")
address = details.get("Address", "N/A")
city = details.get("City Name", "N/A")
fitness = details.get("Fitness Upto", "N/A")
tax = details.get("Tax Upto", "N/A")
insurance = details.get("Insurance Company", "N/A")
ins_expiry = details.get("Insurance Upto", "N/A")
puc = details.get("PUC Upto", "N/A")
phone = details.get("Phone", "N/A")
vehicle_class = details.get("Vehicle Class", "N/A")

# 🧾 Final formatted output
output = (
f"🚘 <b>Vehicle RC Information</b>

"
f"🔹 <b>RC Number:</b> <code>{rc_number}</code>
"
f"👤 <b>Owner:</b> {owner}
"
f"🏍️ <b>Model:</b> {model}
"
f" <b>Fuel Type:</b> {fuel}
"
f"🧾 <b>Vehicle Class:</b> {vehicle_class}

"
f"📅 <b>Registration Date:</b> {reg_date}
"
f"🏢 <b>Registered RTO:</b> {rto}
"
f"🗺️ <b>City:</b> {city}
"
f"📍 <b>Address:</b>
<code>{address}</code>

"
f"📆 <b>Fitness Upto:</b> {fitness}
"
f"📆 <b>Tax Upto:</b> {tax}
"
f"💡 <b>PUC Upto:</b> {puc}

"
f"🏢 <b>Insurance:</b> {insurance}
"
f"📆 <b>Expiry:</b> {ins_expiry}
"
f"📞 <b>Contact:</b> {phone}

"
f"━━━━━━━━━━━━━━━
"
f"<i>Made by</i> <b>@BotVerseRavi</b> 🚘"
)

bot.sendMessage(output, parse_mode="HTML")

except Exception as e:
bot.sendMessage(
f"⚠️ <b>Error while fetching RC details.</b>
Please try again later.

<i>Made by</i> <b>@BotVerseRavi</b>",
parse_mode="HTML"
)



👨🏻‍💻 Posted by @BotVerseRavi


📢 Share this channel with your friends and remember to give credit if you use it on your channel!
1👍1🔥1🎉1🤩1🏆1
Someone has a strong hatred for this channel, so they're using a fake member panel to get it banned.

Whenever someone hates me for no reason, I'm just laughing at their failed attempts and jealousy. 😂

Btw thanks! 👍🏻
😁5🔥3🏆1
One Year of BotVerse – Dropping Code Wisdom!

Hey everyone,
A whole year since we started this channel to pass on simple programming tips and tricks. We've thrown out over 250+ posts on stuff like Python basics, API setups, debugging headaches, and cool project ideas, and it's been great seeing you all jump in with questions and shares. Shoutout to the whole crew for making it happen; you rock.

Year 2’s got more easy guides and fun challenges coming. If these tips have clicked for you, do me a solid and share the channel with your friends—let's spread the knowledge!

What's one simple code ha©k you've grabbed from here? Hit reply below! 💻

Thanks for your support!
6🙏2🫡1
Phone Number Information Extraction 🤖 [TBC Code]

Command : /info
Usage : /info 9161570798

# Posted by @BotVerseRavi on Telegram.
try:
args = msg.split(" ", 1)
if len(args) != 2:
bot.sendMessage(" Usage: /info <number>\n\nExample: /info 8373838566")
raise ReturnCommand()

number = args[1].strip()

# 🌐 API Request
api_url = "https://jsr-number-info.onrender.com/lookup"
headers = {"Content-Type": "application/json"}
payload = {"number": number}

res = HTTP.post(api_url, json=payload, headers=headers, timeout=25)
data = res.json()

# Validate response
if not data.get("success") or not data.get("data", {}).get("success"):
bot.sendMessage(f" No details found for <b>{number}</b>", parse_mode="HTML")
raise ReturnCommand()

results = data["data"].get("result", [])
if not results:
bot.sendMessage(f"⚠️ No records found for <b>{number}</b>", parse_mode="HTML")
raise ReturnCommand()

# 🧾 Build output
output = f"📱 <b>Mobile Lookup Report</b>\n\n"
output += f"🔍 <b>Query:</b> <code>{number}</code>\n"
output += f" <b>Total Records:</b> {len(results)}\n\n"

for i, r in enumerate(results, 1):
name = r.get("name", "N/A")
father = r.get("father_name", "N/A")
mobile = r.get("mobile", "N/A")
alt = r.get("alt_mobile", "N/A")
circle = r.get("circle", "N/A")
uid = r.get("id_number", "N/A")
address = r.get("address", "N/A").replace("!", "\n").strip()
email = r.get("email", "N/A")

output += (
f"📄 <b>Result {i}</b>\n"
f"👤 <b>Name:</b> <code>{name}</code>\n"
f"👨‍👦 <b>Father:</b> <code>{father}</code>\n"
f"📞 <b>Mobile:</b> <code>{mobile}</code>\n"
f"📱 <b>Alt Mobile:</b> <code>{alt}</code>\n"
f"🆔 <b>ID Number:</b> <code>{uid}</code>\n"
f"🌍 <b>Circle:</b> <code>{circle}</code>\n"
f"🏠 <b>Address:</b>\n<code>{address}</code>\n"
f"📧 <b>Email:</b> <code>{email}</code>\n"
f"──────────────────────────────\n\n"
)

# Split if too long
if len(output) > 3500:
bot.sendMessage(output, parse_mode="HTML")
output = ""

output += "🔗 <i>Powered by</i> <b>@BotVerseRavi</b>"

bot.sendMessage(output, parse_mode="HTML")

except Exception as e:
bot.sendMessage("⚠️ Error occurred while fetching number info.", parse_mode="HTML")

Valid for Bharat only!

👨🏻‍💻 Posted by @BotVerseRavi


📢 Share this channel with your friends and remember to give credit if you use it on your channel!
3🔥1🎉1
🚀 Auto-Approve Telegram Join Requests: Python Bot Code + User Notifications [TBC Code]


Command : /handler_chat_join_request

Code :
# Posted by @BotVerseRavi on Telegram
# Approve the user's join request
bot.approveChatJoinRequest(chat_id=message.chat.id,
                           user_id=message.from_user.id)

# Set dynamic valuers
bot_username = Bot.info().username
start_link = "https://t.me/" + bot_username + "?start"
user_name = message.from_user.first_name if message.from_user and message.from_user.first_name else "User"
channel_name = message.chat.title if message.chat and message.chat.title else "Channel"
user_id = message.from_user.id

# Define the inline keyboard properly
keyboard = {
    "inline_keyboard": [
        [{"text": "🙋 Check I'm Alive!", "url": f"{start_link}"}]
    ]
}

# Send a welcome message
try:
    bot.sendMessage(
        chat_id=user_id,
        text=(
            f"🎉<b> Hey, Welcome to {channel_name}</b>!\n\n"
            f"🥰 <i>We’re glad to have</i> <b>{user_name}</b> <i>here. Stay tuned for awesome updates and content!</i>\n\n"
            f"<b>☑️ Tap button Below to Alive me!</b>"),
        message_effect_id="5046509860389126442",
        parse_mode="html",
        reply_markup=keyboard
    )
except Exception as e:
    bot.sendMessage(str(e))



👨🏻‍💻 Posted by @BotVerseRavi


📢 Share this channel with your friends and remember to give credit if you use it on your channel!
2👍1🔥1👏1
🌟 AI Video Generator Bot

Gᴇɴᴇʀᴀᴛᴇ Aɪ Vɪᴅᴇᴏs -

🔮 Cᴏᴍᴍᴀɴᴅ: /vid
🌈 Bᴊꜱ Cᴏᴅᴇ:
let text = message.split(" ").slice(1).join(" ").trim();

//Posted on @BotVerseRavi

if (!text) {
return Bot.sendMessage(
"🎥 *AI Video Generator*\n\nPlease provide a prompt.\n\n*Usage:* /vid A dog dancing in rain\n*Example:* /vid Cyberpunk city at night",
{ parse_mode: "Markdown", reply_to_message_id: request.message_id }
);
}

let apiUrl = "https://yabes-api.pages.dev/api/ai/video/v1?prompt=" + encodeURIComponent(text);

HTTP.get({
url: apiUrl,
success: "/onVidGenerated",
error: "/onVidError"
});

Gᴇɴᴇʀᴀᴛᴇᴅ Vɪᴅᴇᴏ Rᴇᴘʟʏ -

🔮 Cᴏᴍᴍᴀɴᴅ: /onVidGenerated
🌈 Bᴊꜱ Cᴏᴅᴇ:
try {
let data = JSON.parse(content);

if (data && data.success && data.url) {
Api.sendVideo({
chat_id: chat.chatid,
video: data.url,
caption: "💖 Generated by: @BotVerseRavi 😌",
parse_mode: "Markdown",
reply_to_message_id: request.message_id
});
} else {
Bot.sendMessage(" Failed to generate video. Please try again later.", {
reply_to_message_id: request.message_id
});
}
} catch (err)
//Posted on @BotVerseRavi
{
Bot.sendMessage(" Error: " + err.message, {
reply_to_message_id: request.message_id
});
}

Eʀʀᴏʀ Hᴀɴᴅʟᴇʀ -

🔮 Cᴏᴍᴍᴀɴᴅ: /onVidError
🌈 Bᴊꜱ Cᴏᴅᴇ:
Bot.sendMessage(" Network Error! Please try again later.",
//Posted on @BotVerseRavi
{
reply_to_message_id: request.message_id
});



Exᴀᴍᴘʟᴇ Usᴇ - /vid Sunset over snowy mountains


👨🏻‍💻 Posted by @BotVerseRavi


📢 Share this channel with your friends and remember to give credit if you use it on your channel!
2🔥2🥰1🎉1🏆1
🚀 TBC Code Script: Easy Broadcast Automation 😎



Command: /forbroadcast
admins = ["1234567890"] # Replace it with your user ID
if str(u) not in admins:
    raise ReturnCommand()
# made by @BotVerseRavi
if options == None:
    bot.replyText(u, "<b>🎙️ Send Any Message To Forward Broadcast\n\nTo Cancel: /cancel</>")
    Bot.handleNextCommand("/forbroadcast", options=True)
    raise ReturnCommand()

else:
    if message.text == "/cancel":
        bot.sendMessage("<b> Cancelled</>")
        raise ReturnCommand()

    msg_id = message.message_id
    chat_id = message.chat.id

    code = f"bot.forwardMessage(chat_id=u, from_chat_id={chat_id}, message_id={msg_id})"

    url = libs.webhook.getUrlFor("/broadResult", u)
    task = Bot.broadcast(code=code, callback_url=url)
    Bot.saveData(task, None)
    bot.sendMessage("<b>🔁 Forward Broadcast Processing...</b>")
# made by @BotVerseRavi

2⃣ Command for Broadcast Status

Command : /broadResult
# made by @BotVerseRavi
try:
    get = options.json
    total = get.total
    success = get.total_success
    fail = get.total_errors
   
    txt = f"""<b>
🎙️ Broadcast Done
   
👥 Total: {total}
Success: {success}
Failed: {fail}
</b>"""
    bot.sendMessage(txt)
except:
    bot.sendMessage("<b> Broadcast Data Process Failed</b>")
# made by @BotVerseRavi



👨🏻‍💻 Posted by @BotVerseRavi


📢 Share this channel with your friends and remember to give credit if you use it on your channel!
2👍1🔥1🥰1
🔰 Generators in Python


👨🏻‍💻 Posted by @BotVerseRavi


📢 Share this channel with your friends and remember to give credit if you use it on your channel!
2🔥2🥰1
GITHUBSTUDENT50-M2QRIA


Free 50$ Atlas Credit!

Note: Someone else might have already taken this code, just try your luck.


👨🏻‍💻 Posted by @BotVerseRavi


📢 Share this channel with your friends and remember to give credit if you use it on your channel!
3🔥1
🔰 Convert decimals to other number system


👨🏻‍💻 Posted by @BotVerseRavi


📢 Share this channel with your friends and remember to give credit if you use it on your channel!
🤩21🔥1
🔰 5 different ways to swap two numbers in python


👨🏻‍💻 Posted by @BotVerseRavi


📢 Share this channel with your friends and remember to give credit if you use it on your channel!
🔥21🙏1