π’ Update: Privacy Policy & Terms of Use
We've updated our Privacy Policy and Terms of Use to improve clarity and reflect how we handle your data and services.
To continue using our bots & mini-apps, please take a moment to review the new policies.
π Privacy Policy
π Terms of Use
By continuing, you agree to the updated terms. If you have questions, feel free to contact @BotVerseRaviSupport.
Thank you for your trust and support! β€οΈ
β€3π2
Part 2 [TBC]
π°Command
/onWebhookImportant for ban users directly
# Posted by @BotVerseRavi on Telegram
# Check if 'json' key exists
if options is None or options.json is None:
bot.replyText(u, "β Not Allowed", parse_mode="Markdown")
raise ReturnCommand()
# Extract fields from IP worker JSON response
response = options['json']
status = response.get('status')
user_id = response.get('user_id')
message_text = response.get('message', "")
# Ban check based on status
if status == "continue":
bot.sendMessage(
"βοΈ <b>Youβre already a verified user!</b>\n\n"
"π Redirecting you to the main menu...",
parse_mode="html"
)
# Bot.runCommand('/main-menu')
raise ReturnCommand()
elif status == "fail":
User.saveData('ban_u', True)
if "duplicate" in message_text.lower():
bot.sendMessage(
"π¨ <b>Security Violation Detected!</b>\n\n"
"β οΈ Multiple accounts detected from your device.\n"
"Youβve been <u>banned</u> from using this bot.",
parse_mode="html"
)
else:
bot.sendMessage(
"π« <b>Access Denied!</b>\n\n"
"Weβve detected <u>suspicious activity</u> or proxy use.\n"
"You have been <b>permanently banned</b> from using this bot.",
parse_mode="html"
)
raise ReturnCommand()
elif status == "success":
User.saveData("verification_made", True)
bot.sendMessage(
"β <b>Verification Successful!</b>\n\n"
"π You're now verified and can use all features of the bot.",
parse_mode="html"
)
raise ReturnCommand()
else:
bot.sendMessage(
"β <b>Unknown response received.</b>\n\n"
"Please try again or contact support.",
parse_mode="html"
)
raise ReturnCommand()
π° Command
@# Posted by @BotVerseRavi on Telegram
if User.getData('ban_u') == True:
bot.sendMessage(
"π« <b>Access Denied!</b>\n\n"
"Weβve detected <u>suspicious activity</u> or proxy use.\n"
"You have been <b>permanently banned</b> from using this bot.",
parse_mode="html"
)
raise returnCommand()
π¨π»βπ» Posted by @BotVerseRavi
π’ Share this channel with your friends and remember to give credit if you use it on your channel!
β€6π1
Device Verification Script [TBC]
1β£ Part 1
2β£ Part 2
π¨π»βπ» 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
βοΈ Text Quiz Poll Maker π₯ [TPY]
π Command:
/quiz# Posted by @BotVerseRavi on Telegram
bot.sendChatAction(chat_id=message.chat.id, action="typing")
parts = message.text.split(" ", 1)
if len(parts) > 1:
topic = parts[1]
else:
topic = "quiz"
api_url = f"https://pollmakerai.apinepdev.workers.dev/?question={topic}"
try:
response = HTTP.get(api_url)
response.raise_for_status()
data = response.json()
question = data.get("question")
options = data.get("options", [])
correct_answer = data.get("correct_answer")
explanation = data.get("explanation")
if not all([question, options, correct_answer]):
bot.sendMessage(
chat_id=message.chat.id,
text=f"β Sorry, I couldn't find a quiz for the topic '{topic}'. Please try another one."
)
raise ReturnCommand()
correct_option_id = options.index(correct_answer)
bot.sendPoll(
chat_id=message.chat.id,
question=question,
options=options,
type='quiz',
correct_option_id=correct_option_id,
explanation=explanation,
is_anonymous=False
)
except Exception as e:
bot.sendMessage(
chat_id=message.chat.id,
text="β An error occurred while fetching the quiz. Please try again later."
)
π οΈ How to Use:
Use the command
/quiz or type quiz followed by your topic. For example, quiz History of the Roman Empire..π¨π»βπ» 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
Having trouble deploying your bot with our code scripts?
Let us know in the comments below! We're happy to help troubleshoot any issues you're encountering. Any suggestions you have for this channel are also welcome.
π₯2β€1π1
BotVerse by Ravi
Having trouble deploying your bot with our code scripts? Let us know in the comments below! We're happy to help troubleshoot any issues you're encountering. Any suggestions you have for this channel are also welcome.
No issues, great! Everyone is successfully deploying their bots using our script.
Happy Coding! π
Happy Coding! π
β€3π2π₯1π₯°1π1π1
π± GitHub Profile Information [TBC]
Command :
/githubExample :
/github BotVerseRavi# Posted by @BotVerseRavi on Telegram
if not params:
bot.sendMessage("β Please provide a GitHub username.\n\nExample:\n<code>/github BotVerseRavi</code>", parse_mode="HTML")
raise ReturnCommand()
username = params.strip()
url = f"https://api.github.com/users/{username}"
try:
res = HTTP.get(url)
data = res.json()
if "message" in data and data["message"] == "Not Found":
bot.sendMessage(f"β GitHub user <b>{username}</b> not found.", parse_mode="HTML")
raise ReturnCommand()
# Extract all fields
name = data.get("name") or "N/A"
login = data.get("login") or "N/A"
id_ = data.get("id") or "N/A"
node_id = data.get("node_id") or "N/A"
avatar = data.get("avatar_url") or ""
html_url = data.get("html_url") or ""
repos_url = data.get("repos_url") or ""
followers_url = data.get("followers_url") or ""
following_url = data.get("following_url") or ""
gists_url = data.get("gists_url") or ""
blog = data.get("blog") or "N/A"
location = data.get("location") or "N/A"
email = data.get("email") or "N/A"
hireable = str(data.get("hireable")) or "N/A"
bio = data.get("bio") or "No bio provided."
twitter = data.get("twitter_username") or "N/A"
company = data.get("company") or "N/A"
followers = data.get("followers", 0)
following = data.get("following", 0)
public_repos = data.get("public_repos", 0)
public_gists = data.get("public_gists", 0)
created = data.get("created_at") or "N/A"
updated = data.get("updated_at") or "N/A"
# Format message
text = (
f"<b>π€ GitHub Profile</b>\n"
f"π¨βπ» Name: <b>{name}</b>\n"
f"π Username: <code>{login}</code>\n"
f"π ID: <code>{id_}</code>\n"
f"𧬠Node ID: <code>{node_id}</code>\n"
f"π Location: {location}\n"
f"π’ Company: {company}\n"
f"π° Blog: {blog}\n"
f"βοΈ Email: {email}\n"
f"π Hireable: {hireable}\n"
f"π¦ Twitter: {twitter}\n"
f"π¦ Public Repos: <b>{public_repos}</b>\n"
f"ποΈ Gists: <b>{public_gists}</b>\n"
f"π₯ Followers: <b>{followers}</b> | Following: <b>{following}</b>\n"
f"π Bio: <i>{bio}</i>\n"
f"π Created: {created}\n"
f"π οΈ Updated: {updated}\n"
f"π Profile: <a href='{html_url}'>{html_url}</a>\n"
f"π Repos: <a href='{repos_url}'>Repos Link</a>\n"
f"π€ Followers: <a href='{followers_url}'>Followers</a>\n"
f"β‘οΈ Following: <a href='{following_url}'>Following</a>\n"
f"π Gists: <a href='{gists_url}'>Gists</a>"
)
bot.sendPhoto(photo=avatar, caption=text, parse_mode="HTML")
except Exception as e:
bot.sendMessage("β οΈ Failed to fetch GitHub profile. Try again later.")
π¨π»βπ» 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π€1
π€ Random Card π³ Generator [TBC]
Command :
/gen# Posted by @BotVerseRavi on Telegram
try:
# Helper function to generate a random number string
def generate_digits(length):
return ''.join([str(libs.Random.randomInt(0, 9)) for _ in range(length)])
# Generate card details
card_number = generate_digits(16)
cvv = generate_digits(3)
month = str(libs.Random.randomInt(1, 12)).zfill(2)
year = libs.Random.randomInt(2025, 2030)
expiry = f"{month}/{year}"
# Enhanced UI Output
card_info = f"""
<b>π³ Virtual Card Generator</b>
ββββββββββββββββββ
<b>π’ Card Number:</b>
<code>{card_number}</code>
<b>π Expiry Date:</b>
<code>{expiry}</code>
<b>π CVV:</b>
<code>{cvv}</code>
ββββββββββββββββββ
<b>β Generated Successfully!</b>
"""
# Send the formatted message
bot.sendMessage(card_info.strip(), parse_mode="html")
except Exception as e:
bot.sendMessage(f"β οΈ <b>Error:</b> <code>{str(e)}</code>", parse_mode="html")
π¨π»βπ» 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π1
π€ βHow To Set Bot Menu Commands In Your Bot [TBC]
π§© Command:
/setMyCommands# Posted by @BotVerseRavi on Telegram
bot_token = Bot.info().token
commands = [
{'command': 'start', 'description': 'start me'},
{'command': 'help', 'description': 'get help'},
{'command': 'list', 'description': 'just ok'}
]
# Set the commands
url = f'https://api.telegram.org/bot{bot_token}/setMyCommands'
headers = {'Content-type': 'application/json'}
data = {
'commands': commands,
'scope': {'type': 'default'}
}
response = bunchify(HTTP.post(url, headers=headers, json=data).json())
bot.replyText(u, response)
π¨π»βπ» 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
π€ Broadcast [TPY Script]
Command :
/broadcast# Posted by @BotVerseRavi on Telegram
admins = ["123456789"]
if str(u) not in admins:
raise ReturnCommand()
if options == None:
bot.replyText(u, "<b>ποΈ Send Any Message To Broadcast in HTML\n\nTo Cancel: /cancel</b>", parse_mode="html")
Bot.handleNextCommand("/broadcast", options=True)
raise ReturnCommand()
else:
if message.text == "/cancel":
bot.sendMessage("<b>β Cancelled</b>", parse_mode="html")
raise ReturnCommand()
# Function to create broadcast code
def broadcast(method, txt, fileId):
typ = method.lower()
if method == "Message":
code = f"""bot.sendMessage(chat_id=u, text='''{txt}''', parse_mode="html")"""
elif str(txt) == "None":
code = f"""bot.send{method}(chat_id=u, {typ}="{fileId}")"""
else:
code = f"""bot.send{method}(chat_id=u, {typ}="{fileId}", caption='''{txt}''', parse_mode="html")"""
return code
# Detect content and apply HTML formatting
txt = message.caption if message.caption else message.text
entities = message.caption_entities if message.caption else message.entities
txt = apply_html_entities(txt, entities, {}) # Corrected with third param
# Identify message type and prepare broadcast
if message.photo:
code = broadcast("Photo", txt, message.photo[-1].file_id)
elif message.text:
code = broadcast("Message", txt, None)
elif message.video:
code = broadcast("Video", txt, message.video.file_id)
elif message.audio:
code = broadcast("Audio", txt, message.audio.file_id)
elif message.document:
code = broadcast("Document", txt, message.document.file_id)
elif message.sticker:
code = broadcast("Sticker", txt, message.sticker.file_id)
elif message.animation:
code = broadcast("Animation", txt, message.animation.file_id)
else:
bot.sendMessage("<b>β Wrong File Format!</b>", parse_mode="html")
raise ReturnCommand()
# Launch the broadcast
url = libs.Webhook.getUrlFor("/broadResult", u)
task = Bot.broadcast(code=code, callback_url=url)
Bot.saveData(task, None)
bot.sendMessage("<b>π Broadcast Processing...</b>", parse_mode="html")
Command :
/broadResult# Posted by @BotVerseRavi on Telegram
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>")
β οΈ Note: Replace
123456789 with your user ID.π¨π»βπ» 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
π YouTube Video Summarizer Code (BJS for Bots.Business)
π Description: Summarize YouTube videos up to 1000 words.
π Command: /start
β³ Wait for response: β On
---
π Command:
/start// Posted by @BotVerseRavi on Telegram
Bot.sendMessage("π¬ Welcome to the YouTube Summarizer Bot!\n\nPlease send the YouTube video link:");
Bot.runCommand("get_video_url");
---
π Command:
/get_video_urlβ³ Wait for response: β On
// Posted by @BotVerseRavi on Telegram
let yt_url = message;
User.setProperty("yt_url", yt_url, "string");
Bot.sendMessage("β Got the video link!\nNow enter the word count (15 to 1000):");
Bot.runCommand("/get_word_count");
---
π Command:
/get_word_countβ³ Wait for response: β On (NOTE: must be On in BB to capture user input)
// Posted by @BotVerseRavi on Telegram
let user_input = message;
let word_count = parseInt(user_input);
if (isNaN(word_count) || word_count < 15 || word_count > 1000) {
Bot.sendMessage("β Word count must be between 15 and 1000. Try again:");
Bot.runCommand("/get_word_count");
return;
}
let yt_url = User.getProperty("yt_url");
if (!yt_url) {
Bot.sendMessage("β No video link found. Please start again with /start.");
return;
}
Bot.sendMessage("β³ Summarizing your video...");
HTTP.get({
url: "https://api.hazex.sbs/yt-summarizer",
params: {
url: yt_url,
wordCount: word_count
},
success: "/onSummaryResult",
error: "/onSummaryError",
// Optional: pass word_count for use in the callback
bb_options: { word_count: word_count }
});
---
π Command:
/onSummaryResult // Posted by @BotVerseRavi on Telegram
let res = JSON.parse(content);
if (res.error) {
let msg = res.message || "Unknown error occurred.";
Bot.sendMessage("β API Error: " + msg);
} else {
let summary = res.result || "β οΈ No summary returned.";
let word_count = options.word_count;
Bot.sendMessage("β Summary (" + word_count + " words):\n\n" + summary);
}
---
π Command:
/onSummaryError// Posted by @BotVerseRavi on Telegram
Bot.sendMessage("π« Failed to connect to the summarization API. Please try again later.");
π¨π»βπ» Posted by @BotVerseRavi
π’ Share this with your friends and remember to give credit if you use it on your channel!
π2 2β€1π₯1π€©1
π€ Random Quote Sender [TPY]
Command :
/quote# Posted by @BotVerseRavi on Telegram
api_url = "https://zenquotes.io/api/random"
response = HTTP.get(api_url)
if response.status_code == 200:
data = response.json()
quote = data[0]["q"]
author = data[0]["a"]
message_text = f"β {quote} β\n\nβ *{author}*"
bot.sendMessage(chat_id=u, text=message_text, parse_mode="Markdown")
else:
bot.sendMessage("Failed to fetch a quote. Please try again later.")
π¨π»βπ» 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
π Free Image Processing API Source Code
// Posted by @BotVerseRavi on Telegram
export default {
async fetch(request) {
const url = new URL(request.url);
const imageUrl = url.searchParams.get("url");
const tool = url.searchParams.get("tool");
if (!imageUrl || !tool) {
return new Response("Missing required parameters: url and tool", { status: 400 });
}
const apiEndpoints = {
removebg: "https://api.remove.bg/v1.0/removebg",
enhance: "https://api.deepai.org/api/torch-srgan",
upscale: "https://api.deepai.org/api/waifu2x",
restore: "https://api.deepai.org/api/image-editor",
colorize: "https://api.deepai.org/api/colorizer"
};
const apiKey = {
removebg: "YOUR_REMOVEBG_API_KEY",
deepai: "YOUR_DEEPAI_API_KEY"
};
if (!apiEndpoints[tool]) {
return new Response("Invalid tool specified", { status: 400 });
}
try {
let apiUrl = apiEndpoints[tool];
let headers = {};
let body = {};
if (tool === "removebg") {
headers["X-Api-Key"] = apiKey.removebg;
body = new URLSearchParams({ image_url: imageUrl });
} else {
headers["api-key"] = apiKey.deepai;
body = new URLSearchParams({ image: imageUrl });
}
const apiResponse = await fetch(apiUrl, {
method: "POST",
headers: headers,
body: body
});
if (!apiResponse.ok) {
throw new Error("Failed to process image");
}
const jsonResponse = await apiResponse.json();
const resultUrl = jsonResponse.output_url || jsonResponse.data?.output_url;
if (!resultUrl) {
throw new Error("No output received");
}
const finalImageResponse = await fetch(resultUrl);
return new Response(finalImageResponse.body, {
headers: { "Content-Type": finalImageResponse.headers.get("Content-Type") }
});
} catch (error) {
return new Response(`Error processing request: ${error.message}`, { status: 500 });
}
}
};
βοΈ API Format:
https://your-worker-subdomain.worker.dev/?url=<IMAGE_URL>&tool=<TOOL_NAME>π Example API Request:
https://your-worker-subdomain.worker.dev/?url=https://example.com/image.jpg&tool=removebgπ¨π»βπ» Posted by @BotVerseRavi
π’ Share this channel with your friends and remember to give credit if you use it on your channel!
β€4π₯2π1π€©1 1
β€οΈβπ₯ All Necessary Info:
π’ Share this channel with your friends and remember to give credit if you use it on your channel!
βHow to Host on Workers.dev Get API Keys
βHosting on Cloudflare Workers (workers.dev)
1οΈβ£ Sign Up for Cloudflare
Go to https://workers.cloudflare.com/ and sign up if you donβt have an account.
Once signed in, navigate to the Workers Pages section.
2οΈβ£ Create a New Worker
Click on "Create Application" β Select "Worker".
In the Worker editor, replace the default code with your script.
3οΈβ£ Deploy Your Worker
Click "Save and Deploy" to make it live.
Youβll receive a unique URL likehttps://your-worker-subdomain.worker.dev/that you can use for API requests.
4οΈβ£ Custom Domain (Optional)
You can map your Worker to a custom domain via Cloudflareβs DNS Settings.
---
βHow to Get API Keys for Image Processing
β Remove.bg API Key
Sign up at https://www.remove.bg/api and generate an API key from your account.
β DeepAI API Key (For Upscale, Enhance, Restore, Colorize)
Sign up at https://deepai.org/ and navigate to the API section to get your key.
π‘ Where to Add the Keys?
Replace "YOURREMOVEBGAPIKEY" and "YOURDEEPAIAPIKEY" in the script with your actual keys.
---
βAvailable Modes (tool parameter values)
1οΈβ£ removebg β Removes background from images using Remove.bg API.
2οΈβ£ enhance β Enhances image quality using DeepAIβs torch-srgan.
3οΈβ£ upscale β Upscales images using DeepAIβs waifu2x.
4οΈβ£ restore β Restores images using DeepAIβs image-editor.
5οΈβ£ colorize β Converts black white images to color using DeepAIβs colorizer.
π‘ Example Usage:https://your-worker-subdomain.worker.dev/?url=https://example.com/image.jpg&tool=upscale
π¨π»βπ» Posted by @BotVerseRavi
π’ Share this channel with your friends and remember to give credit if you use it on your channel!
π₯3β€1π₯°1π€1 1
π Introducing Our Instagram Reel Download API!
π₯ Easily download Instagram Reels via a simple API call. Whether you're a developer building a bot, app, or automation tool β this free public API is for you.
https://instagram-api-botverseravi.gt.tc
π¨βπ» Developer: @Unknown_RK01
π Channel: @BotVerseRavi
π οΈ Support: @BotVerseRaviSupport
π Terms of Use | Privacy Policy
Powered by @BotVerseRavi
π₯ Easily download Instagram Reels via a simple API call. Whether you're a developer building a bot, app, or automation tool β this free public API is for you.
π API Endpoint:
https://instagram-api-botverseravi.gt.tc/api.php/?url=<INSTAGRAM_REEL_URL>π Example:
https://instagram-api-botverseravi.gt.tc/api.php/?url=https://www.instagram.com/reel/DKuM_oLvhQm/?igsh=cTIybHNrdTFqdG5yπ Docs & Live Preview:
https://instagram-api-botverseravi.gt.tc
π¨βπ» Developer: @Unknown_RK01
π Channel: @BotVerseRavi
π οΈ Support: @BotVerseRaviSupport
π Terms of Use | Privacy Policy
β€2π₯1π€©1π1π1 1
Type this command to get complete bot statistics π β including Bot ID, username, name, and more! [TPY]Command :
/your_command_name
# Posted by @BotVerseRavi on Telegram
stats = Account.get_bots_stats()
if stats["ok"]:
result = stats["result"]
msg = "π Account Bot Statistics\n"
msg += f"β’ Total Bots: {result['total_bots']}\n"
msg += f"β’ Total Users: {result['total_users']}\n"
msg += f"β’ Active Users: {result['total_active_users']}\n"
msg += f"β’ Total Commands: {result['total_commands']}\n"
msg += "\nπ¦ Bots Overview:\n"
for b in result["bots"]:
msg += f"\nπΉ {b['name']}\n"
msg += f"β’ Bot ID: {b['botid']}\n"
msg += f"β’ Username: @{b['username']}\n"
msg += f"β’ Status: {b['status']}\n"
msg += f"β’ Users: {b['users']} | Active: {b['active_users']}\n"
msg += f"β’ Blocked: {b['blocked_users']}\n"
msg += f"β’ Commands: {b['commands']}\n"
msg += f"β’ Points Used: {b['points_used']}\n"
msg += "\nπΉ Powered by BotVerse by Ravi\nJoin : @BotVerseRavi"
if len(msg) > 4000:
Account.saveData("all_stats_log", msg)
file = Account.getDataFile("all_stats_log")
Bot.sendDocument(file, caption="π Full Bot Stats")
else:
Bot.sendMessage(text=f"<pre>{msg}</pre>", parse_mode="HTML")
else:
Bot.sendMessage("β Failed to fetch account statistics.")
π¨π»βπ» 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
Creating a Link Remover Bot for a Telegram group using PHP
1. Creating a Bot using @BotFather.
2. Adding the Bot to the Group and making it an admin.
3. Using Telegram Bot API to monitor messages and delete those containing links.
Step 1: Create a Bot
β’ Go to @BotFather and type /newbot.
β’ Follow the steps and get your bot token.
Step 2: Add the Bot to Your Group
β’ Add the bot to your Telegram group.
β’ Promote it to admin with "Delete Messages" permission.
Step 3: Deploy PHP Bot
Save the following script as
link_remover_bot.php on your server:<?php
$botToken = "YOUR_BOT_TOKEN"; // Replace with your bot token
$update = json_decode(file_get_contents("php://input"), true);
if (isset($update['message'])) {
$message = $update['message'];
$chatId = $message['chat']['id'];
$messageId = $message['message_id'];
$text = isset($message['text']) ? $message['text'] : '';
// Regular expression to detect links
if (preg_match('/https?:\/\/|www\./i', $text)) {
deleteMessage($chatId, $messageId);
}
}
// Function to delete a message
function deleteMessage($chatId, $messageId) {
global $botToken;
$url = "https://api.telegram.org/bot$botToken/deleteMessage";
$data = [
'chat_id' => $chatId,
'message_id' => $messageId
];
file_get_contents($url . "?" . http_build_query($data));
}
?>
Step 4: Set Up a Webhook
You need to host the script on a server with HTTPS and set a webhook:
https://api.telegram.org/botYOUR_BOT_TOKEN/setWebhook?url=YOUR_SERVER_URL/link_remover_bot.php
Note: Replace
YOUR_BOT_TOKEN and YOUR_SERVER_URL with your actual bot token and server URL.π¨π»βπ» Posted by @BotVerseRavi
π’ Share this channel with your friends and remember to give credit if you use it on your channel!
π’ How to Create Inline Search in TBC (Step-by-Step)
1οΈβ£ Enable Inline Mode in BotFather
Before your bot can respond to inline queries (like @YourBotName something), you must turn on inline mode:
1. Open @BotFather in Telegram.2οΈβ£ Create the Command in Telebot Creator
2. Send /setinline.
3. Choose your bot.
4. Set a placeholder (e.g. Search something...).
5. Done β β now Telegram will send inline queries to your bot.
β’ Go to your bot in TBC.
β’ Create a new command.
β’ Name it exactly:
/handler_inline_queryβ’ This command will automatically run when someone types @YourBotName in any chat.
3οΈβ£ Full TPY Code with Static Data
# Posted by @BotVerseRavi on Telegram
# Get the text after the bot's username
query = message.query.strip() if message.query else ""
# If no query entered, show default items
if not query:
results = [
{
"type": "article",
"id": "1",
"title": "Static Result 1",
"description": "Example description",
"input_message_content": {
"message_text": "You selected Static Result 1"
}
},
{
"type": "article",
"id": "2",
"title": "Static Result 2",
"description": "Another example",
"input_message_content": {
"message_text": "You selected Static Result 2"
}
}
]
else:
# Show what the user typed
results = [
{
"type": "article",
"id": "typed",
"title": f"You searched: {query}",
"description": "Click to send this text",
"input_message_content": {
"message_text": f"You searched: {query}"
}
}
]
# Answer the inline query
bot.answerInlineQuery(
message.id,
results,
cache_time=1
)
4οΈβ£ How It Works
β’ If the user types @YourBotName β shows two static items.
β’ If the user types @YourBotName hello β shows their search text as a result.
β’ You can replace the static data with API results later (Pixabay, Google Images, etc.).
5οΈβ£ Testing
1. Open any chat (even Saved Messages).
2. Type: @YourBotName
β See static results.
3. Type:
@YourBotName catsβ See βYou searched: catsβ.
π¨π»βπ» 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π€©1π1
π€ Telegram Story Download [TPY]
Command :
*# Posted by @BotVerseRavi on Telegram
username = msg.strip()
User.saveData("story_username", username)
res = HTTP.get(f"https://telegram-story.apis-bj-devs.workers.dev/?username={username}&action=archive")
data = res.json()
if data["status"] and data["result"]["totalStories"] > 0:
User.saveData("story_data", data["result"]["stories"])
Bot.runCommand("show_story")
else:
bot.sendMessage("No stories found or invalid username.")
Command :
show_story# Posted by @BotVerseRavi on Telegram
index = int(User.getData("story_index") or 0)
stories = User.getData("story_data")
if index < 0 or index >= len(stories):
bot.sendMessage("Invalid story index.")
else:
if message.message_id:
message_id = message.message_id
bot.deleteMessage(
chat_id=message.chat.id,
message_id=message_id
)
story = stories[index]
User.saveData("story_index", index)
keyboard = [[
{"text": "β Back", "callback_data": "prev_story"},
{"text": "Next βΆ", "callback_data": "next_story"}
]]
bot.sendVideo(story["url"], caption=f"Story {index + 1} of {len(stories)}\nDate: {story['date']}", reply_markup={"inline_keyboard": keyboard})
Command :
prev_story# Posted by @BotVerseRavi on Telegram
bot.answerCallbackQuery(call.id,"Back Done β ...",show_alert=False)
index = int(User.getData("story_index") or 0)
User.saveData("story_index", max(0, index - 1))
Bot.runCommand("show_story")
Command :
next_story# Posted by @BotVerseRavi on Telegram
bot.answerCallbackQuery(call.id,"Next Done β ...",show_alert=False)
index = int(User.getData("story_index") or 0)
stories = User.getData("story_data")
User.saveData("story_index", min(index + 1, len(stories) - 1))
Bot.runCommand("show_story")
β‘οΈ Demo Project : @Stories_Downbot
π¨π»βπ» 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
Age calculator by date of birth
Command:
/calculateAnswer:
Enter your date of birth.
Format: DD-MM-YYYYWait for answer:
trueπ¨π»βπ» 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π€1