xseaqbka/Nawaab_RoBotPublic · Bot Template
AIThis Telegram bot acts as a TOTP authenticator: users can add accounts via Base32 secret, QR code, or otpauth:// URI, list saved keys, and generate current OTP codes on demand with refresh and delete options. It includes an admin panel with user ban/unban, paginated user management, required-channel management, and a broadcast system that sends text, image, or copied replied messages to all private chats. A web dashboard endpoint provides OTP generation and account management over HTTP. The bot also supports an on/off maintenance switch and per-user access gating.
Utilitytotpauthenticatorotp2fabroadcastadmin
59 commands1 envUpdated 10d agoCreated Aug 28, 2026
commands/_delete.js
javascript · 47 lines
1/**#command2name: /delete3answer: 4keyboard: 5parse_mode: html6aliases: delete7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/* Command: /delete */13if (!(await authUtils.userGate())) return;14 15const keys = await authUtils.getKeys();16const index = parseInt(String(options?.index || params || "").trim(),10);17 18if (Number.isNaN(index)) {19 const rows=[];20 for(let i=0;i<keys.length;i+=2){21 const row=[authUtils.btn("🗑 "+(keys[i].name||"Account "+(i+1)), "delete_"+(i+1), "danger")];22 if(keys[i+1]) row.push(authUtils.btn("🗑 "+(keys[i+1].name||"Account "+(i+2)), "delete_"+(i+2), "danger"));23 rows.push(row);24 }25 rows.push([authUtils.btn("⬅️ My Keys","my_keys"),authUtils.btn("✕ Close","close","danger")]);26 await authUtils.renderMedia("🗑 <b>Delete Account</b>\n\nSelect the account you want to remove.",rows,"key_image");27 return;28}29 30if(index<1 || index>keys.length){31 await authUtils.render("❌ <b>Invalid account</b>\n\nUse <code>/delete 2</code> or select an account.",[32 [authUtils.btn("🔐 My Keys","my_keys"),authUtils.btn("✕ Close","close","danger")]33 ]);34 return;35}36 37const account=keys[index-1];38await authUtils.render(39 "⚠️ <b>Delete Account?</b>\n\n" +40 `<b>${authUtils.escapeHtml(account.name||"Authenticator Account")}</b>\n\n` +41 "This permanently removes the saved secret from your bot account.",42 [43 [authUtils.btn("🗑 Confirm Delete","confirm_delete_"+index,"danger")],44 [authUtils.btn("⬅️ Cancel","my_keys")]45 ],46 { }47);