media_id = options.get("media_id")
files = options.get("files", [])
keyboard = ReplyKeyboardRemove()
if message.text == "β
":
# Confirmation Logic
if files:
shareable_link = f"https://t.me/{Bot.info().username}?start={media_id}"
bot.sendMessage(
chat_id=message.chat.id,
text=f"β
Upload complete!\nShare this link:\n{shareable_link}",
reply_markup=keyboard
)
Bot.saveData(media_id, files) # Save to DB
else:
bot.sendMessage(chat_id=message.chat.id, text="β No media was uploaded.")
else:
media_entry = None
if message.photo:
media_entry = {"type": "photo", "file_id": message.photo[-1]["file_id"], "caption": message.caption or ""}
elif message.video:
media_entry = {"type": "video", "file_id": message.video["file_id"], "caption": message.caption or ""}
elif message.audio:
media_entry = {"type": "audio", "file_id": message.audio["file_id"]}
elif message.voice:
media_entry = {"type": "voice", "file_id": message.voice["file_id"]}
elif message.document:
media_entry = {"type": "document", "file_id": message.document["file_id"]}
elif message.animation:
media_entry = {"type": "animation", "file_id": message.animation["file_id"]}
elif message.sticker:
media_entry = {"type": "sticker", "file_id": message.sticker["file_id"]}
if media_entry:
files.append(media_entry)
bot.sendMessage(chat_id=message.chat.id, text="β
Media saved. Send more or type β
to finish.")
else:
bot.sendMessage(chat_id=message.chat.id, text="β Unsupported input. Please send media files only.")
# Loop until user confirms
Bot.handleNextCommand("/handle_media", options={"media_id": media_id, "files": files})β€οΈβπ₯ Command:
/delete_messagesπ TPY:
user_id = options.get("user_id")
msg_ids = options.get("message_ids", [])
media_id = options.get("media_id")
# Delete all sent messages
for mid in msg_ids:
try:
bot.deleteMessage(chat_id=user_id, message_id=mid)
except Exception:
pass
# Notify user with restore option
Bot.sendMessage(
chat_id=user_id,
text="ποΈ Your files have been deleted from chat after 10 minutes.\nClick below to restore them.",
reply_markup={
"inline_keyboard": [[
{"text": "π Restore Files", "url": f"https://t.me/{Bot.info().username}?start={media_id}"}
]]
}
)π¨βπ» Created By: @Swastik_Raj
Β© Copyright: @BotNations
π’ Feel free to share and give credit if you use this in your channel!
β€14π4π2π₯°1
Bot Nations π
media_id = options.get("media_id") files = options.get("files", []) keyboard = ReplyKeyboardRemove() if message.text == "β
": # Confirmation Logic if files: shareable_link = f"https://t.me/{Bot.info().username}?start={media_id}" bot.sendMessage(β¦
YouTube
π Build Your Own Multiple File Sharing Telegram Bot Easily! π€ | Privates Bots
π Build Your Own Multiple File Sharing Telegram Bot Easily! π€ | Privates Bots
In this step-by-step tutorial, learn how to create a Multiple File Sharing Telegram Bot that lets users share multiple media files through a single link β fast, secure, and endβ¦
In this step-by-step tutorial, learn how to create a Multiple File Sharing Telegram Bot that lets users share multiple media files through a single link β fast, secure, and endβ¦
β€3π2β€βπ₯1
π Introducing Code Formatter β Your Go-To Solution for Clean Code!
π Visit Us Now: https://code-formating.vercel.app
β¨ Supports Python, JS, Ruby, C#, and more
π¨ Custom themes & beginner-friendly interface
π Private, secure, and lightning-fast
π Visit Us Now: https://code-formating.vercel.app
π£ Love it? Share it with your friends and colleagues!
β€8π―3π2
π‘οΈ Channel Membership Verification Bot [TELEBOT CODES]
β€οΈβπ₯ Command:
π TPY:
β οΈ Give credit if you are posting on your channel.
π¨βπ» Created By: @swastik_raj
Β© Credit: @botnations
π Purpose: Check if a user has joined required channels.
β€οΈβπ₯ Command:
/verifyπ TPY:
# Command: /verify
try:
# Define your channels here (can be 1 or more)
channels = ["@botnations", "-1001687277105"]
bot_token = str(Bot.info().token)
# Send "checking..." message and save message_id for later editing
checking = bot.sendMessage("π Checking your channel membership status, please wait...")
# Build the API URL dynamically using the channels list
api_url = f"https://channel-membership.privates-bots.workers.dev/?botToken={bot_token}&id={u}&channel={','.join(channels)}"
# Make HTTP request
response = HTTP.get(api_url)
data = bunchify(response.json())
# Prepare message content
if data.ok == True:
summary = data.summary
joined = summary.totalJoined
total = summary.totalChannelsChecked
left = summary.totalLeft
text = f"<b>π Membership Summary</b>\n\n"
text += f"π€ User ID: <code>{u}</code>\n"
text += f"β Joined: <b>{joined}</b> / {total}\n"
text += f"π« Left: <b>{left}</b>\n\n"
text += "<b>π¦ Detailed Status:</b>\n"
for ch in data.membership:
status_emoji = "β " if ch.isMember else "β"
text += f"{status_emoji} <b>{ch.chatId}</b> - {ch.classification}\n"
if data.joinedAllChats == True:
text += "\nπ You have joined all required channels!"
else:
text += "\nβ οΈ Please join all required channels to continue."
# Edit previous message with the result
bot.editMessageText(text=text, chat_id=message.chat.id, message_id=checking.message_id, parse_mode="html")
else:
bot.editMessageText(text="β Failed to verify membership. Please try again later.", chat_id=message.chat.id, message_id=checking.message_id)
except Exception as e:
bot.editMessageText(text=f"β οΈ Error occurred: {str(e)}", chat_id=message.chat.id, message_id=checking.message_id)
β οΈ Give credit if you are posting on your channel.
π¨βπ» Created By: @swastik_raj
Β© Credit: @botnations
β€13β€βπ₯2π2π₯2
Bot Nations π
π‘οΈ Channel Membership Verification Bot [TELEBOT CODES] π Purpose: Check if a user has joined required channels. β€οΈβπ₯ Command: /verify π TPY: # Command: /verify try: # Define your channels here (can be 1 or more) channels = ["@botnations", "-1001687277105"]β¦
YouTube
β
Membership Verification Telegram Bot | Privates Bots
β
Membership Verification Telegram Bot Easily! π€ | Privates Bots
In this detailed step-by-step tutorial, learn how to create a **Membership Verification Telegram Bot** that automatically checks if users are members of your added channels before givingβ¦
In this detailed step-by-step tutorial, learn how to create a **Membership Verification Telegram Bot** that automatically checks if users are members of your added channels before givingβ¦
β€7π2
I am thinking of starting to do some videos to help people who want to legitimately be able to codeβ most seems like copy paste without any knowledge about the concept.
3β€15π€©5
π‘ 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:
π§βπ» Coded by: @devendra
Β© Copyright: @BjsCodes
βοΈ 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:
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)
π§βπ» Coded by: @devendra
Β© Copyright: @BjsCodes
βοΈ Only use in state of high requirement, else BB server may get load.
β€9π1π1
Bot Nations π
Want this bot tutorial? @PerplexitySRoBot
Real time information!
Text to video
Image Editing & much more
Text to video
Image Editing & much more
β€9π₯6π3
Bot Nations π
https://youtu.be/qT367lglThQ
You can clone the @PerplexitySRoBot from the above video!
β€8π2
β€8π€©1
ππΌ Hello BotMakers!
Iβm working on my next YouTube videoβand itβs all about how you can start earning $50β$100/month by monetizing your Telegram bot π°
Stay tunedβand donβt forget to subscribe so you donβt miss it! ππ₯
Iβm working on my next YouTube videoβand itβs all about how you can start earning $50β$100/month by monetizing your Telegram bot π°
Stay tunedβand donβt forget to subscribe so you donβt miss it! ππ₯
β€15β‘4π₯4π2π2β€βπ₯1π1
Bot Nations π
ππΌ Hello BotMakers! Iβm working on my next YouTube videoβand itβs all about how you can start earning $50β$100/month by monetizing your Telegram bot π° Stay tunedβand donβt forget to subscribe so you donβt miss it! ππ₯
Here's the video
https://youtu.be/m9INAwGkbPI
https://youtu.be/m9INAwGkbPI
π6β€5
Bot Nations π
Here's the video https://youtu.be/m9INAwGkbPI
Hit the like button ππΌ
Nd leave a comment π«ΆπΌ
Nd leave a comment π«ΆπΌ
β€11π₯°4
Forwarded from BIZ FACTORY (MΠΊ HΟΡΡΞ±ΞΉΞ·)
Command :
/rcUsage :
/rc KL43G1669TBL Code π
if (!params) {
return msg.reply("<b>Usage:</b> /rc <i>RC_Number</i>\n\nExample:\n<code>/rc KL43G1669</code>", { parse_mode: "HTML" })
}
const rc = params.trim().toUpperCase()
const loading = await msg.reply(`π <b>Fetching details for:</b> <code>${rc}</code>\nPlease wait...`, { parse_mode: "HTML" })
try {
const apiUrl = `https://vehicle-eight-vert.vercel.app/api?rc=${encodeURIComponent(rc)}`
const res = await HTTP.get({ url: apiUrl, timeout: 20000 })
if (!res.ok || !res.data || !res.data.details) {
throw new Error("No vehicle information found for this number.")
}
const d = res.data.details
const info =
`π <b>Vehicle Information</b>\nβββββββββββββββ\n` +
`πͺͺ <b>RC Number:</b> <code>${res.data.rc}</code>\n` +
`π€ <b>Owner:</b> ${d["Owner Name"] || "N/A"}\n` +
`ποΈ <b>Model:</b> ${d["Maker Model"] || "N/A"}\n` +
`β½ <b>Fuel Type:</b> ${d["Fuel Type"] || "N/A"}\n` +
`ποΈ <b>RTO:</b> ${d["Registered RTO"] || "N/A"}\n` +
`π
<b>Registration Date:</b> ${d["Registration Date"] || "N/A"}\n` +
`π§Ύ <b>Tax Upto:</b> ${d["Tax Upto"] || "N/A"}\n` +
`π§° <b>Fitness Upto:</b> ${d["Fitness Upto"] || "N/A"}\n` +
`π§― <b>PUC Upto:</b> ${d["PUC Upto"] || "N/A"}\n` +
`π‘οΈ <b>Insurance Company:</b> ${d["Insurance Company"] || "N/A"}\n` +
`π <b>Insurance Upto:</b> ${d["Insurance Upto"] || "N/A"}\n` +
`π <b>Contact:</b> ${d["Phone"] || "N/A"}\n` +
`π <b>Address:</b> ${d["Address"] || "N/A"}\nβββββββββββββββ\n` +
`π€ <i>Made by @bizft</i>`
await Api.editMessageText({
chat_id: msg.chat.id,
message_id: loading.result.message_id,
text: info,
parse_mode: "HTML"
})
} catch (err) {
await Api.editMessageText({
chat_id: msg.chat.id,
message_id: loading.result.message_id,
text: `β <b>Failed to fetch data</b>\n\nReason: <i>${err.message}</i>`,
parse_mode: "HTML"
})
}π Vehicle Info Bot β Instantly fetch any RC details in seconds! β‘
π§ Made by @bizft
Setup Guide:
1οΈβ£ Go to TelebotHost.com and create your bot.
2οΈβ£ Paste the
/rc TBL code I gave above into a new command.3οΈβ£ Deploy & start your bot β send
/rc KL43G1669 to test! β
Please open Telegram to view this post
VIEW IN TELEGRAM
β€21π3