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/_ban_user.js
javascript · 33 lines
1/**#command2name: /ban_user3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/* Command: /ban_user */13if (!(await authUtils.adminOnly())) return;14 15const banTargetId = String(options?.target_id || params || "").trim();16 17if (!/^\d+$/.test(banTargetId) || banTargetId === String(await authUtils.getAdminId())) {18 await authUtils.render(19 "❌ <b>Invalid or protected user ID.</b>",20 [[authUtils.btn("⬅️ Admin Panel", "admin_menu"), authUtils.btn("✕ Close", "close", "danger")]]21 );22 return;23}24 25await db.user.set("banned", true, { user_id: Number(banTargetId) });26 27await authUtils.render(28 `🚫 <b>User Banned</b>\n\nUser <code>${banTargetId}</code> is now blocked from using the bot.`,29 [30 [authUtils.btn("🟢 Unban", "unban_user_" + banTargetId, "success")],31 [authUtils.btn("⬅️ Users", "admin_users"), authUtils.btn("✕ Close", "close", "danger")]32 ]33);