📢 Multiple Channel Membership Verification Code [Bots.Business]
💓 Command: /verify
🔍 BJS Code:
// Check if the request content is empty
if (!content) {
// List of channels to verify membership
var channel = ["@privates_bots", "@PB_Sponsorship"];
// HTTP request to verify membership
HTTP.post({
url: "https://verify-membership-coding-with-mohits-projects.vercel.app/verify-membership",
body: {
botToken: bot.token, // Bot token for verification
chatIds: channel, // Chat IDs (channels to check)
userId: user.telegramid // Telegram user ID
},
success: "/verify" // Callback function on success
});
return;
}
// Parse the response and check membership status
var status = JSON.parse(content).joinedAllChats;
if (status === true) {
// User has joined all required channels
Bot.sendMessage("✅ Thank you for joining the channels! 🎉\n\n🔖 *Copyright:* @privates_bots");
return;
}
// If the user hasn't joined all channels
Bot.sendMessage("⚠️ You must join all required channels to proceed! 🚫\n\n🔖 *Copyright:* @privates_bots");
👨💻 Created By: @Swastik_Raj
🎖 API By: @Mohit_Kr_Mishra
© Copyright: @Privates_Bots
💓 Command: /verify
🔍 BJS Code:
// Check if the request content is empty
if (!content) {
// List of channels to verify membership
var channel = ["@privates_bots", "@PB_Sponsorship"];
// HTTP request to verify membership
HTTP.post({
url: "https://verify-membership-coding-with-mohits-projects.vercel.app/verify-membership",
body: {
botToken: bot.token, // Bot token for verification
chatIds: channel, // Chat IDs (channels to check)
userId: user.telegramid // Telegram user ID
},
success: "/verify" // Callback function on success
});
return;
}
// Parse the response and check membership status
var status = JSON.parse(content).joinedAllChats;
if (status === true) {
// User has joined all required channels
Bot.sendMessage("✅ Thank you for joining the channels! 🎉\n\n🔖 *Copyright:* @privates_bots");
return;
}
// If the user hasn't joined all channels
Bot.sendMessage("⚠️ You must join all required channels to proceed! 🚫\n\n🔖 *Copyright:* @privates_bots");
👨💻 Created By: @Swastik_Raj
🎖 API By: @Mohit_Kr_Mishra
© Copyright: @Privates_Bots
📢 Feel free to share and give credit if you use this in your channel!