hello, how are you As you know it has been a long time since Telegram and Telegram are giving such good service that all the users are very happy with Telegram. Telegram is a social media platform. Here there is not only chat but all the tools you can do in this chat you like Instagram downloader. Facebook video downloader, text to audio converter, live price checker, there are many such tools that cannot be counted.
In that way, here we teach you how to create those tools. There are many such tools available here that you must have done them. So in this article, we are going to tell you that you are going to install a captcha verification system in your Telegram bot in Telegram bot, which can be done by Telegram bot only after verifying any user.
All the Telegram bots that we have created earlier are made on bots.business, this captcha verification is also going to tell you by adding them to the telegram bot made on bots.business. Which is very easy if you do not know what bots business is then you can read the article below.
So now let's talk about how to install captcha verification in Telegram bot in bots.business
How to Add Captcha Verification in telegram bot with bots.business
Command 1
function makecaptcha(length) {
var result = [];
var characters = '176266266226262626262262616160123456789';
var charactersLength = characters.length;
for ( var i = 0; i < length; i++ ) {
result.push(characters.charAt(Math.floor(Math.random() *
charactersLength)));
}
return result.join('');
}
var captcha = makecaptcha(4)
//website support only 4 characters or it will slice to 4 charachers if exceeds
Api.sendPhoto({
chat_id: user.telegramid,
photo: "https://api.ikitz.xyz/captcha/simple/v1?captcha="+captcha,
caption: "Enter the captcha for human Verification"
})
Bot.run({
command: "/check_captcha",
options: {captcha: captcha}
})
Command 2
if(!options){return}
if(!options.captcha){return}
var captcha = options.captcha
if(message != captcha){
Bot.sendMessage("Wrong Captcha")
//Bot.runCommand(/captcha) or /Bot.runCommand(/main_menu)
return
}
Bot.sendMessage("✅ Verified Succefully")
Bot.runCommand("/main_menu")