The following changes were made by the replace_file_content tool to: /root/aadharbot/index.js. If relevant, proactively run terminal commands to execute this code for the USER. Don't ask for permission.
[diff_block_start]
@@ -1884,45 +1884,7 @@
});
bot.command('retrieve', (ctx) => startService(ctx, 'RETRIEVE_SMS'));
-bot.command('num', async (ctx) => {
- const text = ctx.message.text.trim();
- const args = text.split(' ').slice(1);
- const mobile = args[0] ? args[0].trim() : null;
-
- if (mobile) {
- if (!/^\d{10}$/.test(mobile)) {
- return ctx.reply("❌ Invalid Mobile Number: Please enter a valid 10-digit mobile number.", { parse_mode: 'HTML' });
- }
- await handleNumLookup(ctx, mobile);
- } else {
- const userId = ctx.chat.id;
- sessions[userId] = {
- step: 'WAITING_FOR_NUM_MOBILE',
- serviceType: 'NUMBER_TO_INFO',
- reqId: crypto.randomUUID()
- };
- ctx.reply('📱 Please enter your 10-digit Mobile Number for Info Lookup:', { parse_mode: 'HTML' });
- }
-});
-bot.command('numclear', async (ctx) => {
- const text = ctx.message.text.trim();
- const args = text.split(' ').slice(1);
- const mobile = args[0] ? args[0].trim() : null;
-
- if (!mobile || !/^\d{10}$/.test(mobile)) {
- return ctx.reply("💡 Usage: /numclear <10-digit mobile number>", { parse_mode: 'HTML' });
- }
-
- try {
- if (redisClient) {
- await redisClient.del(`num_cache:${mobile}`);
- }
- ctx.reply(`✅ Cache cleared for: ${mobile}. Next search for this number will fetch fresh results from the API.`, { parse_mode: 'HTML' });
- } catch (e) {
- console.error("Cache clear error:", e.message);
- ctx.reply("❌ Error clearing cache.");
- }
-});
+
bot.command('cancel', (ctx) => {
const userId = ctx.chat.id;
if (sessions[userId]) {
[diff_block_end]
Please note that the above snippet only shows the MODIFIED lines from the last change. It shows up to 3 lines of unchanged lines before and after the modified lines. The actual file contents may have many more lines not shown.