Bot Nations πŸš€
17.1K subscribers
18 photos
1 video
3 files
53 links
πŸ–πŸ» Welcome to β€œBot Nations”!

πŸ€– Hello, Everyone! Here, I’ll Teach You How To Create Telegram Bots.

➑ Join Our Discussion Group: @Private_Bots_Chats

πŸ“ž For Sponsorships, Ads, or Promotions, Contact Us At @PB_Sponsorship.
Download Telegram
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
πŸš€ Introducing Code Formatter – Your Go-To Solution for Clean Code!

✨ 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]
πŸ“Œ 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
1❀8🀩2⚑1πŸŽ‰1
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:
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
Want this bot tutorial?

@PerplexitySRoBot
❀6πŸ”₯3
Bot Nations πŸš€
Want this bot tutorial? @PerplexitySRoBot
Real time information!

Text to video
Image Editing & much more
❀9πŸ”₯6πŸ‘3
Complete 450+ subscribers for the code!

YouTube link:
youtube.com/@privates_bots
❀121πŸ”₯4πŸ†’3
@MusicDownloadKBot active again βœ…
πŸ‘Œ4❀2
Bot Nations πŸš€
https://youtu.be/qT367lglThQ
You can clone the @PerplexitySRoBot from the above video!
❀8πŸŽ‰2
Order affordable custom bot
Cheapest price ever!

Dm @coderswastik or comment below
❀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! πŸ””πŸŽ₯
❀15⚑4πŸ”₯4πŸŽ‰2πŸ†’2❀‍πŸ”₯1πŸ‘1
Bot Nations πŸš€
Here's the video https://youtu.be/m9INAwGkbPI
Hit the like button πŸ‘πŸΌ

Nd leave a comment 🫢🏼
❀11πŸ₯°4
πŸ”₯8❀5
Forwarded from BIZ FACTORY (MΠΊ HΟƒΡ•Ρ•Ξ±ΞΉΞ·)
πŸ” Vehicle info Bot Codes for TBH

Command : /rc
Usage : /rc KL43G1669

TBL 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