The command exited with code 0.
Output:
async function startService(ctx, serviceType, directMobile = null) {
const userId = ctx.chat.id;
const firstName = ctx.from?.first_name || 'User';
// OPTIMIZATION: Fetch channel membership and user access in parallel
const [isMember, access] = await Promise.all([
checkChannelMembership(ctx, userId),
checkUserAccess(userId)
]);
if (!isMember) {
if (ctx.callbackQuery) {
ctx.answerCbQuery("โ ๏ธ Channel join required!", { show_alert: true }).catch(() => { });
}
let forceJoinMsg = '';
if (!access.hasAccess) {
forceJoinMsg = `๐ Free Search Offer / เคซเฅเคฐเฅ เคธเคฐเฅเค เคเคซเคฐ ๐\n` +
`โโโโโโโโโโโโโโโโโโโโโโโโโโ\n` +
`Aapko 1 Free Search (120 Credits) bilkul free paane ke liye hamara channel join karna hoga!\n\n` +
`(To unlock 1 free search / 120 credits, please join our telegram channel below!)\n` +
`โโโโโโโโโโโโโโโโโโโโโโโโโโ`;
} else {
forceJoinMsg = `โ ๏ธ Membership Required / เคเฅเคจเคฒ เคเฅเคตเคพเคเคจ เคเคฐเคจเคพ เค
เคจเคฟเคตเคพเคฐเฅเคฏ เคนเฅ โ ๏ธ\n` +
`โโโโโโโโโโโโโโโโโโโโโโโโโโ\n` +
`Aapke paas active credits/plan hai, lekin bot use karne ke liye hamara channel join karna mandatory hai!\n\n` +
`(You have active credits/plan, but you must join our telegram channel to continue using the bot!)\n` +
`โโโโโโโโโโโโโโโโโโโโโโโโโโ`;
}
let missing = membershipCache.get(userId)?.missingChannels;
if (!missing || missing.length === 0) {
missing = [
{ id: '-1003813331448', link: 'https://t.me/MayaXDev', label: '๐ข MayaXDev' },
{ id: '-1003924061886', link: 'https://t.me/BipinOne', label: '๐ข BipinOne' },
{ id: '-1003910704384', link: 'https://t.me/BipinOneChat', label: '๐ข BipinOneChat' },
{ id: '-1003900141964', link: 'https://t.me/NumberBaaz', label: '๐ข NumberBaaz' }
];
}
const keyboard = missing.map(ch => [{ text: ch.label.replace(/[^a-zA-Z0-9 ]/g, "").trim() || "Join Channel", url: ch.link, style: "primary" }]);
keyboard.push([{ text: 'Verify Join', callback_data: 'VERIFY_CHANNEL_FSUB', style: 'success' }]);
return ctx.reply(forceJoinMsg, {
parse_mode: 'HTML',
...Markup.inlineKeyboard(keyboard)
});
}
// The 'access' variable is already fetched via Promise.all at the top of this function.
const required = serviceType === 'RETRIEVE_SMS' ? 80 :
serviceType === 'EID_TO_PDF' ? 100 : 120;