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
ProfileTelegram
59 commands1 envUpdated 10d agoCreated Aug 28, 2026
Back to folder

commands/_unban_user.js

javascript · 33 lines

Raw
1/**#command2name: /unban_user3answer: 4keyboard: 5parse_mode: html6aliases: unban_user7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/* Command: /unban_user */13if (!(await authUtils.adminOnly())) return;14 15const unbanTargetId = String(options?.target_id || params || "").trim();16 17if (!/^\d+$/.test(unbanTargetId)) {18  await authUtils.render(19    "❌ <b>Invalid 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", false, { user_id: Number(unbanTargetId) });26 27await authUtils.render(28  `✅ <b>User Unbanned</b>\n\nUser <code>${unbanTargetId}</code> can use the bot again.`,29  [30    [authUtils.btn("🚫 Ban", "ban_user_" + unbanTargetId, "danger")],31    [authUtils.btn("⬅️ Users", "admin_users"), authUtils.btn("✕ Close", "close", "danger")]32  ]33);