BotVerse by Ravi
152 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
๐Ÿ’ก Fun Quiz Challenge Bot [BJS]


โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–

๐ŸŽฏ Command: /quiz

๐Ÿ“ BJS:

// Posted by @BotVerseRavi on Telegram

// Send quiz intro message
Bot.sendMessage("*๐ŸŒŸ New Quiz Alert! Ready to test your knowledge? ๐Ÿ“š*");

// Start the quiz process
function startQuiz() {
  var apiUrl = "https://opentdb.com/api.php?amount=1";

  // Indicate typing action to the user
  Api.sendChatAction({
    chat_id: chat.chatid,
    action: "typing"
  });

  // Fetch quiz data from OpenTDB API
  HTTP.get({
    url: apiUrl,
    success: "/onQuiz",   // Command to handle quiz data response
    error: "/onError"     // Command to handle error
  });
}

startQuiz();


โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–

๐Ÿ“ฅ Command: /onQuiz

๐Ÿ“ BJS:

// Posted by @BotVerseRavi on Telegram

// Parse the API response
var response = JSON.parse(content);

// Check if quiz data is available
if (response.response_code === 0 && response.results.length > 0) {
  var quiz = response.results[0];

  var question = "๐ŸŽฏ " + quiz.question;
  var correctAnswer = quiz.correct_answer;
  var options = quiz.incorrect_answers.concat(correctAnswer);

  // Shuffle options randomly
  options = options.sort(function() {
    return Math.random() - 0.5;
  });

  // Send quiz poll
  Api.sendPoll({
    chat_id: chat.chatid,
    question: question,
    options: options,
    type: "quiz",
    correct_option_id: options.indexOf(correctAnswer),
    explanation: "โœ… The correct answer is: *" + correctAnswer + "*",
    is_anonymous: false
  });

  // Store data in user properties for later use if needed
  User.setProperty("quiz_question", question, "string");
  User.setProperty("correct_answer", correctAnswer, "string");

  // Send follow-up message with button
  Api.sendMessage({
    chat_id: chat.chatid,
    text: "๐Ÿ” Want to explore more quizzes? ๐ŸŒŸ",
    reply_markup: {
      inline_keyboard: [
        [
          { text: "๐Ÿ” Search More", callback_data: "/quiz" }
        ]
      ]
    }
  });

} else {
  // In case of no data or error in response
  Bot.sendMessage("โš ๏ธ Unable to fetch quiz. Please try again later.");
}


โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–

โš ๏ธ Command: /onError

๐Ÿ“ BJS:

// Posted by @BotVerseRavi on Telegram

Bot.sendMessage("โŒ Failed to load quiz. Please try again later.");


โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–

Posted by @BotVerseRavi

 
๐Ÿ“ข Love anime? Share this with your friends and remember to give credit if you use it on your channel!
๐Ÿ”ฅ2211
IP VERIFICATION CODE FOT TBC


โœ… /start Command (Professional + Buttons)

# Coded by @BotVerseRavi on Telegram
text = """
<b>๐Ÿ‘‹ Welcome to the Official IP Verification Bot</b>

<i>This system helps protect our platform from spam, abuse, and fake accounts.</i>
<u>๐Ÿ” Secure access is only granted after identity confirmation.</u>

๐Ÿ‘‰ Click below to get started.
"""

keyboard = [
[{"text": "โœ… Verify Now", "callback_data": "verify_now"}],
[{"text": "โ„น๏ธ Why Need?", "callback_data": "why_need"}]
]

bot.sendMessage(text, parse_mode="html", reply_markup={"inline_keyboard": keyboard})


โœ… verify_now Command (With Loading Bar & IP Check)

# Coded by @BotVerseRavi on Telegram

text = "<b>โณ Loading...</b>"
loading = bot.editMessageText(text, message_id=message.message_id, parse_mode="html")

msg_id = loading.message_id

# Simulate loading bar
bot.editMessageText("<b>โ–ฐโ–ฑโ–ฑโ–ฑโ–ฑโ–ฑโ–ฑโ–ฑโ–ฑโ–ฑ 0%</b>", message_id=msg_id)
bot.editMessageText("<b>โ–ฐโ–ฐโ–ฑโ–ฑโ–ฑโ–ฑโ–ฑโ–ฑโ–ฑโ–ฑ 10%</b>", message_id=msg_id)
bot.editMessageText("<b>โ–ฐโ–ฐโ–ฐโ–ฑโ–ฑโ–ฑโ–ฑโ–ฑโ–ฑโ–ฑ 25%</b>", message_id=msg_id)
bot.editMessageText("<b>โ–ฐโ–ฐโ–ฐโ–ฐโ–ฑโ–ฑโ–ฑโ–ฑโ–ฑโ–ฑ 40%</b>", message_id=msg_id)
bot.editMessageText("<b>โ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฑโ–ฑโ–ฑโ–ฑโ–ฑ 55%</b>", message_id=msg_id)
bot.editMessageText("<b>โ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฑโ–ฑโ–ฑ 75%</b>", message_id=msg_id)
bot.editMessageText("<b>โ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฑ 90%</b>", message_id=msg_id)
bot.editMessageText("<b>โ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐ 100%</b>", message_id=msg_id)

http = libs.customHTTP.CustomHTTP()
response = http.get("https://api.ipify.org?format=json")

if response.status_code == 200:
user_ip = response.json().get("ip", "unknown_ip")
verified_ips = Bot.getData("verified_ips") or []

if user_ip in verified_ips:
bot.editMessageText("โŒ <b>Access Denied</b>\n<i>This IP has already been verified before.</i>", parse_mode="html", message_id=msg_id)
else:
verified_ips.append(user_ip)
Bot.saveData("verified_ips", verified_ips)
bot.editMessageText("โœ… <b>Verification Successful</b>\n<i>You now have access to the bot.</i>", parse_mode="html", message_id=msg_id)
else:
bot.editMessageText("โš ๏ธ <b>Error</b>\n<i>Could not fetch your IP. Please try again later.</i>", parse_mode="html", message_id=msg_id)

http.close()


โ„น๏ธ why_need Command

# Coded by @BotVerseRavi on Telegram

text = """
<b>๐Ÿค” Why Do We Need IP Verification?</b>

<u>โœ… To prevent multiple fake accounts</u>
<u>โœ… To stop abuse from single users</u>
<u>โœ… To ensure one-time access per identity</u>

<i>By verifying user IPs, we improve the quality of engagement and protect our community from bots and spam users.</i>
"""

bot.editMessageText(text, message_id=message.message_id, parse_mode="html")


๐Ÿ”™ back_to_start Command

# Coded by @BotVerseRavi on Telegram

text = """
<b>๐Ÿ‘‹ Welcome to IP Verification Bot</b>

<i>Protecting our system from fake and multi-account abuse.</i>
<u>Verify now to access the system securely.</u>
"""

keyboard = [
[
{"text": "โœ… Verify Now", "callback_data": "verify_now"},
{"text": "โ„น๏ธ Why Need?", "callback_data": "why_need"}
]
]

bot.editMessageText(text, message_id=message.message_id, parse_mode="html", reply_markup={"inline_keyboard": keyboard})


Posed by: @BotVerseRavi


Share this with your friends and remember to give credit if you use it on your channel!
22โค1๐Ÿ”ฅ1111
๐Ÿ“น YouTube Video Details [BJS]


๐ŸŽ– Command:- *

โค๏ธ BJS:-
// Posted by @BotVerseRavi on Telegram

var spl = message.split("/")
var lin = spl[3]
var id = lin.split("?")[0]
HTTP.get({
url:
"https://www.googleapis.com/youtube/v3/videos?id=" +
id +
"&key=your api&part=snippet,contentDetails,statistics,status",
success: "/n"
})

๐ŸŽ– Command:- /n

โค๏ธ BJS:-
// Posted by @BotVerseRavi on Telegram

var yt = JSON.parse(content)
var pub = yt.items[0].snippet.publishedAt
var chid = yt.items[0].snippet.channelId
var title = yt.items[0].snippet.title
//var des = yt.items[0].snippet.description
var tumb = yt.items[0].snippet.thumbnails.maxres.url
var chnlnam = yt.items[0].snippet.channelTitle
var kids = yt.items[0].status.madeForKids
var privacy = yt.items[0].status.privacyStatus
var views = yt.items[0].statistics.viewCount
var like = yt.items[0].statistics.likeCount
var comment = yt.items[0].statistics.commentCount

var txt = `โšก๏ธ <b>Title:</> <i>${title}</>

๐Ÿ‘€ <b>Total Views:</> <code>${views}</>

๐Ÿ‘ <b>Total Likes:</> <code>${like}</>

๐Ÿ’ฌ <b>Total Comments:</> <code>${comment}</>

โ˜ฃ <b>Video Status:</> <i>${privacy}</>

๐Ÿ‘ฆ <b>Video For Kids:</> <i>${kids}</>

๐Ÿ’น <b>Channel Name:</> <i>${chnlnam}</>

๐Ÿ†” <b>Channel ID:</> <code>${chid}</>`

Api.sendPhoto({
photo: tumb,
caption: txt,
parse_mode: "html",
disable_web_page_preview: true
})


๐Ÿ’ž Get API From:- https://developers.google.com for YouTube Data API v3

โ˜ฃ Note:- This BJS Working Only For Long Video Not Short.

Posted by @BotVerseRavi


Share this with your friends and remember to give credit if you use it on your channel!
๐ŸŽ‰1๐Ÿ‘Œ1111
๐Ÿค– AutoKicker [TPY]


When a user leaves your channel, automatically ban them from the channel.


Command : /handler_chat_member

# Posted by @BotVerseRavi on Telegram

# Command: /handler_chat_member

if update_type == 'chat_member':
chat_id = message.chat.id
user = message.new_chat_member.user
user_id = user.id

if message.new_chat_member.status == 'left':
try:
# Remove (kick) the user from the channel
bot.kickChatMember(
chat_id=chat_id,
user_id=user_id,
until_date=0 # Remove without ban, can rejoin
)
except Exception as e:
pass # Ignore errors silently


Posted by @BotVerseRavi



Share this with your friends and remember to give credit if you use it on your channel!
๐Ÿ‘2111
โ€‹โ€‹๐ŸŽ‰ หน๐‹๐ฒ๐ซ๐š โœ˜ ๐™ผแดœsษชแด„หผ โ™ช ษชs BACK ONLINE! ๐ŸŽ‰

Hแด€แด˜แด˜ส แด›แด แด€ษดษดแดแดœษดแด„แด‡ แด›สœแด€แด› แดแดœส€ แดแดœsษชแด„ ส™แดแด›, แดกสœษชแด„สœ สœแด€s ส™แด‡แด‡ษด MIA า“แดส€ แด›สœแด‡ แด˜แด€sแด› ๐Ÿท๐Ÿถ แด…แด€สs, ษชs ษดแดแดก า“แดœสŸสŸส า“แดœษดแด„แด›ษชแดษดแด€สŸ แด€ษดแด… ส€แด‡แด€แด…ส แด›แด ส€แดแด„แด‹ สแดแดœส€ แด„สœแด€แด›s!

๐ŸŽธ หน๐‹๐ฒ๐ซ๐š โœ˜ ๐™ผแดœsษชแด„หผ โ™ช ษดแดแดก า“แด‡แด€แด›แดœส€แด‡s แด€ sแด‡แด€แดสŸแด‡ss แดษชษดษช-แด€แด˜แด˜ แด‡xแด˜แด‡ส€ษชแด‡ษดแด„แด‡ sแด˜แด‡แด„ษชา“ษชแด„แด€สŸสŸส แด›แด€ษชสŸแดส€แด‡แด… า“แดส€ สœษชษขสœ-วซแดœแด€สŸษชแด›ส Iษดแด…ษชแด€ษด แดแดœsษชแด„! Jแดœsแด› แด›สแด˜แด‡ แด›สœแด‡ ส™แดแด›'s แดœsแด‡ส€ษดแด€แดแด‡ ษชษดแด›แด แด›สœแด‡ sแด‡แด€ส€แด„สœ ส™แดx แด€ษดแด… แด…ษชsแด„แดแด แด‡ส€ สแดแดœส€ า“แด€แด แดส€ษชแด›แด‡ sแดษดษขs โ€“ ษขแดœแด€ส€แด€ษดแด›แด‡แด‡แด… แด›แด ษดแด‡แด แด‡ส€ แด…ษชsแด€แด˜แด˜แดษชษดแด›!

๐ŸŽถ Mแดส€แด‡ Tสœแด€ษด Jแดœsแด› Mแดœsษชแด„! หน๐‹๐ฒ๐ซ๐š โœ˜ ๐™ผแดœsษชแด„หผ โ™ช ษชs แด€ แด˜แดแดกแด‡ส€า“แดœสŸ แด„แดแดส™ษชษดแด€แด›ษชแดษด แดา“ แด€ ษขส€แดแดœแด˜ แดแด€ษดแด€ษขแด‡แดแด‡ษดแด› ส™แดแด› แด€ษดแด… แด€ แดแดœsษชแด„ ส™แดแด›. Mแด€ษดแด€ษขแด‡ สแดแดœส€ ษขส€แดแดœแด˜s แด‡า“า“ษชแด„ษชแด‡ษดแด›สŸส แดกสœษชสŸแด‡ แด‡ษดแดŠแดสษชษดษข แดœษดษชษดแด›แด‡ส€ส€แดœแด˜แด›แด‡แด… แด€แด„แด„แด‡ss แด›แด สแดแดœส€ า“แด€แด แดส€ษชแด›แด‡ Iษดแด…ษชแด€ษด แด›แดœษดแด‡s.

โœ… ๐Ÿธ๐Ÿบ/๐Ÿฝ Uแด˜แด›ษชแดแด‡ & Lแด€ษข-Fส€แด‡แด‡ Exแด˜แด‡ส€ษชแด‡ษดแด„แด‡: EษดแดŠแดส แดœษดษชษดแด›แด‡ส€ส€แดœแด˜แด›แด‡แด… แดแดœsษชแด„ แด˜สŸแด€สส™แด€แด„แด‹, แด€ษดสแด›ษชแดแด‡, แด€ษดสแดกสœแด‡ส€แด‡.

Sแด›ษชสŸสŸ สœแด€แด แด‡ วซแดœแด‡sแด›ษชแดษดs แดส€ ษดแด‡แด‡แด… สœแด‡สŸแด˜? Dแดษด'แด› สœแด‡sษชแด›แด€แด›แด‡ แด›แด แด˜ษชษดษข แดแด‡ แด€แด› @Unknown_RK01!

Hแดแดก แด›แด แด€แด…แด… หน๐‹๐ฒ๐ซ๐š โœ˜ ๐™ผแดœsษชแด„หผ โ™ช แด›แด สแดแดœส€ แด„สœแด€แด›:
521
๐Ÿค– AutoGreeter Bot [TPY]


๐Ÿ”น English Description:

> ๐Ÿ’ฌ This bot replies with a message and a sticker when someone types common greetings like gm, gn, etc.
โœ… It replies as a tag to the same message (using reply), and also mentions the user in a stylish format.
โš ๏ธ Works only in group chats, not in private.


๐Ÿ”น Hinglish Description:

> ๐Ÿ’ฌ Ye bot jab koi gm, gn, good night, morning likhta hai to uss message par reply karta hai (tag karke) aur ek sticker bhi bhejta hai.
โœ… Reply ke sath user ka naam mention hota hai stylish format mein.
โš ๏ธ Ye sirf group mein kaam karta hai, private mein nahi.
Command : @

# Posted by @BotVerseRavi on Telegram

# Only run this block if it's not private
if message.chat.type != "private":

msg_text = message.text.lower().strip()
user_id = message.from_user.id
name = message.from_user.first_name or "Friend"
mention = f"<a href='tg://user?id={user_id}'>{name}</a>"

gn_tags = ["gn", "good night", "g.n", "g n", "night", "gnite", "sleep well", "sweet dreams"]
gm_tags = ["gm", "good morning", "g.m", "g m", "morning", "vgm", "v.g.m", "v g m", "veri good morning", "very good morning"]

if msg_text in gn_tags:
bot.replyText(
chat_id=message.chat.id,
text=f"""<b>โ– ษขแดแดแด… ษดษชษขสœแด› โ– sแดกแด‡แด‡แด› แด…ส€แด‡แด€แดs โ–

โ {mention} ๐Ÿ˜ช

โ– ษขแด แด›แด โžฅ sสŸแด‡แด‡แด˜ แด‡แด€ส€สŸส
</b>""",
parse_mode="HTML",
reply_to_message_id=message.message_id
)
bot.sendSticker(
chat_id=message.chat.id,
sticker="CAACAgUAAyEFAASRixT-AAId-mhWjRqoPOFMsfLC-6hl_arxFZcOAAL_FQACUtG5VmA3z68b5SRLHgQ",
reply_to_message_id=message.message_id
)
raise ReturnCommand()

if msg_text in gm_tags:
bot.replyText(
chat_id=message.chat.id,
text=f"""<b>โ– ษขแดแดแด… แดแดส€ษดษชษดษข โ– สœแด€แด แด‡ แด€ ษดษชแด„แด‡ แด…แด€ส โ–

โ {mention} ๐ŸŒž

โ– sแด›แด€ส แด˜แดsษชแด›ษชแด แด‡ โžฅ แด‹แด‡แด‡แด˜ ๊œฐแดแด„แดœ๊œฑแด‡แด…
</b>""",
parse_mode="HTML",
reply_to_message_id=message.message_id
)
bot.sendSticker(
chat_id=message.chat.id,
sticker="CAACAgUAAyEFAASRixT-AAId-WhWjRmHHKE7Srq2-DcLCbDZEAILAAJMFwACa1e4Vki7Onvrl_E_HgQ",
reply_to_message_id=message.message_id
)
raise ReturnCommand()



๐Ÿ‘จโ€๐Ÿ’ป Posted by @BotVerseRavi


๐Ÿ“ข Love anime? Share this with your friends and remember to give credit if you use it on your channel!
๐Ÿค2โค1๐Ÿ‘1๐Ÿ”ฅ1๐Ÿ‘Œ1
๐Ÿ”„ ImgBB Image Uploader [BJS]

Command:/imageUrl

Answer: Send me the Image
Wait for answer: On

// Posted by @BotVerseRavi on Telegram

if (!request.photo[0]) {
Bot.sendMessage("*You are Requested to Send A Photo Only!*")
return
}
Bot.sendMessage("Uploading....")
if (request.photo[3]) {
Api.getFile({ file_id: request.photo[3].file_id, on_result: "/upload" })
return
}
if (request.photo[2]) {
Api.getFile({ file_id: request.photo[2].file_id, on_result: "/upload" })
return
}
if (request.photo[1]) {
Api.getFile({ file_id: request.photo[1].file_id, on_result: "/upload" })
return
}
if (request.photo[0]) {
Api.getFile({ file_id: request.photo[0].file_id, on_result: "/upload" })
return}



Command:/upload

// Posted by @BotVerseRavi on Telegram

var key = "YOUR API KEY HERE"
//get from api.imgbb.com

if (!content) {
var link =
"https://api.telegram.org/file/bot" + bot.token + "/" + options.result.file_path

HTTP.get({
url: "https://api.imgbb.com/1/upload?key="+key+"&image=" + link,
success: "/upload",
folow_redirects: true
})
return
}
var res = JSON.parse(content)
if (res.success == true) {
Bot.sendMessage("๐Ÿ“* Your Image Uploaded to ImgBB*\n\n๐Ÿ”— Link: " + res.data.url,
{ disable_web_page_preview: true })
} else {
Bot.sendMessage("Couldn't Upload file.")
}


Get API Key from: api.imgbb.com

๐Ÿ‘จโ€๐Ÿ’ป Posted by @BotVerseRavi



๐Ÿ“ข Love anime? Share this channel with your friends and remember to give credit if you use it on your channel!
โค1๐Ÿ”ฅ1๐Ÿฅฐ1
FREE SSH SERVER
USA VPS


Hostname: usa-host.kcartik-vps.com
Username: kcartik
Password: kcartik
Port: 80
๐Ÿ”ฅ2๐Ÿฅฐ2๐Ÿคฉ2โค1โœ1๐Ÿ˜1๐Ÿค1
DROPPING ULTAHOST SINGAPORE SSH SOON
ONLY SSH, NO VPS
โค1๐Ÿ”ฅ1๐Ÿฅฐ1
ULTAHOST SINGAPORE

Domain singapore-ultahost.kcartik-vps.com
User kcartik
Pass kcartik
Port = 80

Payload GET / HTTP/1.1[crlf]Host: [host][crlf]Upgrade: websocket[crlf][crlf]
โค1๐Ÿ‘1๐Ÿ”ฅ1๐Ÿฅฐ1๐Ÿคฉ1
VPS SSH

Domain usa-jhantu-vps.b-rand.black
User kcartik
Pass kcartik
Port = 80
๐Ÿ”ฅ2โค1๐Ÿค1
๐Ÿง‘โ€๐Ÿ”ฌ Automatic Filtered Replies in Groups [BJS]


โ” Bot replies to user with a specific pre defined replies on triggering a preset filter

Part 1


Command: /setfilter

// Posted by @BotVerseRavi on Telegram

if (!['group', 'supergroup'].includes(chat?.chat_type)) return Bot.sendMessage('Command to be used in groups or channels only');

function sendMsg(text, id) {
Api.sendMessage({ text, reply_to_message_id: id, parse_mode: 'html' });
}

if (!options) {
if (!params && !request.reply_to_message || !params) return sendMsg(
"Use one of the following formats:\n<code>/setfilter &lt;word&gt; | &lt;reply&gt;</code>\n" +
"<code>/setfilter &lt;word&gt;</code> (while replying to a message)",
request.message_id
);
request.text = params;
Bot.setProp(user.telegramid + "data", request, 'json');
return Api.getChatAdministrators({
chat_id: request.chat.id,
on_result: '/setfilter ' + user.telegramid,
});
}

if (options && !options.ok) return;

let [userId, u] = [params, Bot.getProp(params + 'data')];
let isAdmin = options.result.some(admin => ['creator', 'administrator'].includes(admin.status) && admin.user.id == userId);

if (!isAdmin) {
Bot.deleteProp(params + 'data');
return sendMsg("Only admins can set filters!", u.message_id);
}

var [word, replyMessage] = u.text && u.text.includes('|')
? u.text.split(/\s*\|\s*/) : [u.text, u.reply_to_message?.text || u.reply_to_message?.caption];

if (!word || !replyMessage) return sendMsg("Invalid Input! Use case:\n<code>/setfilter &lt;word&gt; | &lt;reply&gt;</code>\n" +
"<code>/setfilter &lt;word&gt;</code> (while replying to a message)", u.message_id);

word = word?.trim().toLowerCase();
var filters = Bot.getProperty(`filters_${u.chat.id}`) || [];
let existingIndex = filters.findIndex(filter => filter.word === word);

existingIndex !== -1
? filters[existingIndex] = { word: word, reply: replyMessage, action: 'reply' }
: filters.push({ word: word, reply: replyMessage, action: 'reply' });

Bot.setProperty(`filters_${u.chat.id}`, filters, 'json');
Bot.deleteProp(userId + 'data');
sendMsg(`Filter set: "<b>${word}</b>" => "<i>${replyMessage}</i>"`, u.message_id);


Command: *

(Master Command)
// Posted by @BotVerseRavi on Telegram

var filters = Bot.getProperty(`filters_${request.chat.id}`) || [];
if (filters.length === 0) return;

var msg = request.text || request.caption;
for (let filter of filters) {
if (msg.toLowerCase().includes(filter.word.toLowerCase())) {
let action = filter.action === 'delete' ? "deleteMessage" : "sendMessage"
Api[action]({
chat_id: request.chat.id, message_id: request.message_id,
text: filter.reply, parse_mode: 'html',
reply_to_message_id: request.message_id,
})
break;
}
}


Usecases:

/setfilter <word> | <reply>
/setfilter <word> (while replying to a message)

โ„น๏ธ Only supports Text Replies

๐Ÿง‘โ€๐Ÿ’ป Posted by @BotVerseRavi


๐Ÿ“ข Love anime? Share this channel with your friends and remember to give credit if you use it on your channel!
๐Ÿ”ฅ5๐Ÿ‘Œ1
FREE VPS


IP Address: 194.238.19.9
Username: root
Root Password: .3Ty7VgQqtw3fHai)Itp


By @BotVerseRavi
โค1๐Ÿ‘1๐Ÿ”ฅ1๐Ÿค1
๐Ÿง‘โ€๐Ÿ”ฌ Automatic Filtered Replies in Groups [BJS]


Part 2



Command: /filters

// Posted by @BotVerseRavi on Telegram

if (!['group', 'supergroup'].includes(chat?.chat_type)) {
return Bot.sendMessage('Command can only be used in groups.');
}

let filters = Bot.getProperty(`filters_${request.chat.id}`) || [];
let nonAggressiveFilters = filters.filter(f => f.action !== 'delete');
let aggressiveFilters = filters.filter(f => f.action === 'delete');

if (!filters.length) return Bot.sendMessage("No filters set in this group.", { is_reply: true });

let filterList = nonAggressiveFilters.map((f, i) => `<b>${i + 1}.</b> <b>${f.word}</b> - <i>${f.reply}</i>`).join('\n');
let aggressiveFilterCount = aggressiveFilters.length ? `\n\nAggressive Filters: <b>${aggressiveFilterCount}</b>` : '';

Api.sendMessage({
text: `Total filters: <b>${filters.length}</b>\n\n${filterList}${aggressiveFilterCount}`,
reply_to_message_id: request.message_id,
parse_mode: 'html'
});


Command: /deletefilter

// Posted by @BotVerseRavi on Telegram

if (!['group', 'supergroup'].includes(chat?.chat_type)) return Bot.sendMessage('Command to be used in groups or channels only');

function sendMsg(text, id){
Api.sendMessage({ text, reply_to_message_id: id, parse_mode: 'html' });
}

if (!options) {
if (!params) return sendMsg("Please specify the word to remove.\n<code>/deletefilter &lt;word&gt;</code>", request.message_id);
return Api.getChatAdministrators({
chat_id: request.chat.id,
on_result: `/deletefilter ${params}&${user.telegramid}&${request.chat.id}&${request.message_id}`,
});
}
if (options && !options.ok) return;

let [word, userId, chatId, msgId] = params.split('&');
let isAdmin = options.result.some(admin => admin.user.id == userId && ['creator', 'administrator'].includes(admin.status));

if (!isAdmin || !word) return sendMsg(!word ? "Please provide a word to delete." : "Only admins can delete filters!", msgId);

let filters = Bot.getProperty(`filters_${chatId}`) || [];
let filterIndex = filters.findIndex(filter => filter.word === word.toLowerCase());

if (filterIndex === -1) return sendMsg(`No filter found for "<b>${word}</b>".`, msgId);

filters.length === 1 ? Bot.deleteProp(`filters_${chatId}`) : Bot.setProperty(`filters_${chatId}`, filters.filter((_, index) => index !== filterIndex), 'json');
sendMsg(`Filter "<b>${word}</b>" has been removed.`, msgId);


Command: /clearfilters
// Posted by @BotVerseRavi on Telegram

if (!['group', 'supergroup'].includes(chat?.chat_type)) return Bot.sendMessage('Command to be used in groups or channels only');

function sendMsg(text, id) {
Api.sendMessage({ text, reply_to_message_id: id, parse_mode: 'html' });
}

if (!options) {
return Api.getChatAdministrators({
chat_id: request.chat.id,
on_result: `/clearfilters ${user.telegramid}&${request.chat.id}&${request.message_id}`,
});
}

if (!options.ok) return;

let [userId, chatId, messageId] = params.split("&");

if (!options.result.some(admin => admin.user.id == userId && ['creator', 'administrator'].includes(admin.status))) {
return sendMsg("Only admins can clear filters!", messageId);
}

if (!Bot.getProperty(`filters_${chatId}`)) {
return sendMsg("No filters to clear in this group.", messageId);
}

Bot.deleteProp(`filters_${chatId}`);
sendMsg("All filters have been cleared.", messageId);


Usecases:

/filters - Lists all regular filters of group
/deletefilter <word> - deletes a filter
/clearfilters - Clears all filters of group at once

โ„น๏ธ Only supports Text Replies

๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป Posted by @BotVerseRavi


๐Ÿ“ข Share this channel with your friends and remember to give credit if you use it on your channel!
โค5๐Ÿ˜1
๐Ÿง‘โ€๐Ÿ”ฌ Automatic Filtered Replies in Groups [BJS]


Part 3


Command: /aggressivefilter


// Posted by @BotVerseRavi on Telegram

if (!['group', 'supergroup'].includes(chat?.chat_type))
return Bot.sendMessage('Command to be used in groups or channels only');

if (!options) {
if (!params) return Bot.sendMessage("Please specify the word to add as an aggressive filter.\n<code>/aggressivefilter &lt;word&gt;</code>", request.message_id);
return Api.getChatAdministrators({
chat_id: request.chat.id,
on_result: `/aggressivefilter ${user.telegramid}&${request.chat.id}&${params?.trim()}&${request.message_id}`
});
}

if (!options.ok) return;
let [userId, chatId, word, msgId] = params.split("&");

if (!options.result.some(admin => admin.user.id == userId && ['creator', 'administrator'].includes(admin.status))) {
return Bot.sendMessage("Only admins can set aggressive filters!", { is_reply: true });
}

if (!word) return Bot.sendMessage("Please specify a valid word for the aggressive filter.", { is_reply: true });

word = word.toLowerCase();
let filters = Bot.getProperty(`filters_${chatId}`) || [];
let existingIndex = filters.findIndex(filter => filter.word === word);
existingIndex !== -1
? filters[existingIndex].action = 'delete'
: filters.push({ word: word, action: 'delete' });

Bot.setProperty(`filters_${chatId}`, filters, 'json');
Bot.deleteMessage({chat_id: chatId, message_id: msgId})
Api.sendMessage({
text: `Aggressive filter set: "<b>${word}</b>" (Messages containing this word will be deleted)`,
parse_mode: 'html'
});

Command: /modfilters


// Posted by @BotVerseRavi on Telegram

if (!['group', 'supergroup'].includes(chat?.chat_type))
return Bot.sendMessage('Command only for groups.');

if (!options) return Api.getChatAdministrators({
chat_id: request.chat.id,
on_result: `/modfilters ${user.telegramid}&${request.chat.id}&${request.message_id}`
});

if (!options.ok) return;

let [userId, chatId, msgId] = params.split("&");

if (!options.result.some(a => a.user.id == userId && ['creator', 'administrator'].includes(a.status)))
return Bot.sendMessage("Only admins can view aggressive filters!", { is_reply: true });

let aggressiveFilters = (Bot.getProperty(`filters_${chatId}`) || []).filter(f => f.action === 'delete');
if (!aggressiveFilters.length)
return Bot.sendMessage("No aggressive filters set.", { is_reply: true });

Api.sendMessage({
text: aggressiveFilters.map((f, i) => `<b>${i + 1}.</b> <b>${f.word}</b>`).join('\n'),
reply_to_message_id: msgId,
parse_mode: 'html'
});


Usecase:

/aggressivefilter <word> - Deletes message with on triggering keyword
/modfilters - List of all Aggressive filters (admins only)

๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป Posted by @BotVerseRavi


๐Ÿ“ข Share this channel with your friends and remember to give credit if you use it on your channel!
โค3๐Ÿ‘1
โค๏ธ Here is the Surprise Update


๐Ÿค” Whatโ€™s Aggressive Filter?
โ–ถ It deletes any message which triggers with any defined keyword by admins. Itโ€™s just like blacklisting any word.

Usage of Filter Commands:

/setfilter <word> | <reply>
/setfilter <word>
(while replying to a message)
/aggressivefilter <word> - Deletes Message on trigger with the keyword
/deletefilter <word> - Remove a filter
/filters - List of Regular filters visible to everyone
/modfilters - List of Aggressive filters visible to admins only
/clearfilters - Clears all filters of chat at once

Show some support ๐Ÿฉถ @BotVerseRavi



BJS Codes are available here:


1โƒฃ Part 1
2โƒฃ Part 2
3โƒฃ Part 3
โค4๐Ÿ‘Œ2
๐Ÿ”— Create Invite Link with Expiration time [BJS]


Command: /createInviteLink

// Posted by @BotVerseRavi on Telegram 

let memberLimit = 10;
let expirationSeconds = 3600; //expiration time in seconds

if (!options) {
Api.createChatInviteLink({
chat_id: request.chat?.id,
name: "My Custom Invite Link",
expire_date: Math.floor(Date.now() / 1000) + expirationSeconds,
member_limit: memberLimit,
// creates_join_request: true
// Do not pass member_limit if creates_join_request is true
on_result: '/createInviteLink',
});
return;
}

let message = `Invite Link: ${options.result.invite_link}\n` +
`Link Name: ${options.result.name}\n` +
`Expires: ${new Date(options.result.expire_date * 1000).toLocaleString()}`;

if (options.result.creates_join_request) message += "\nJoin Request Required: Yes";
if (options.result.member_limit) message += `\nMember Limit: ${options.result.member_limit}`;

Api.sendMessage({ text: message })


โ€ผ๏ธ Important:

Do not pass member_limit parameter if creates_join_request is true, else you will get error.
โ„น๏ธ Bot must be admin with can_invite_users permission.

๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป 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
๐Ÿ”— Copy to Clipboard via Inline Keyboard Button [BJS]


โœˆ๏ธ now supports copying text from inline keyboard buttons of upto 256 characters

This is how:
// Posted by @BotVerseRavi on Telegram

Api.sendMessage({
text: "Copy message from Below Button ๐Ÿ‘‡",
reply_markup: {
inline_keyboard: [
[{ text: "Copy to Clipboard", copy_text: { text: "Hi there!" } }]
]
}
})


๐Ÿ”ง Just add a copy_text field instead of url or callback_data in the inline_keyboard field

๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป 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