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/_admin_user_action.js
javascript · 41 lines
1/**#command2name: /admin_user_action3answer: 4keyboard: 5parse_mode: html6aliases: admin_user_action7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/* Command: /admin_user_action */13if (!(await authUtils.adminOnly())) return;14 15const targetUserId = Number(options?.target_id || 0);16 17if (!Number.isInteger(targetUserId) || targetUserId <= 0) {18 await authUtils.render(19 "❌ <b>Invalid user</b>",20 [[authUtils.btn("⬅️ Users", "admin_users"), authUtils.btn("✕ Close", "close", "danger")]]21 );22 return;23}24 25const targetBanned = await db.user.get("banned", false, { user_id: targetUserId });26 27await authUtils.render(28 "👤 <b>User Details</b>\n\n" +29 `🆔 ID: <code>${targetUserId}</code>\n` +30 `🔐 Status: <b>${targetBanned ? "🚫 Banned" : "🟢 Active"}</b>`,31 [32 [33 authUtils.btn(34 targetBanned ? "🟢 Unban" : "🚫 Ban",35 targetBanned ? "unban_user_" + targetUserId : "ban_user_" + targetUserId,36 targetBanned ? "success" : "danger"37 )38 ],39 [authUtils.btn("⬅️ Users", "admin_users"), authUtils.btn("✕ Close", "close", "danger")]40 ]41);