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/_my_keys.js

javascript · 47 lines

Raw
1/**#command2name: /my_keys3answer: 4keyboard: 5parse_mode: html6aliases: mykeys7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/* Command: /my_keys */13if (!(await authUtils.userGate())) return;14 15const keys = await authUtils.getKeys();16const rows = [];17 18for (let i=0;i<keys.length;i+=2) {19  const row = [20    authUtils.btn("🔐 " + (keys[i].name || "Account " + (i+1)), "view_" + (i+1))21  ];22  if (keys[i+1]) row.push(23    authUtils.btn("🔐 " + (keys[i+1].name || "Account " + (i+2)), "view_" + (i+2))24  );25  rows.push(row);26}27 28if (!keys.length) {29  rows.push([authUtils.btn("➕ Add Key", "add_key", "success")]);30} else {31  rows.push([32    authUtils.btn("➕ Add Key", "add_key", "success"),33    authUtils.btn("🔄 Refresh", "my_keys")34  ]);35}36 37rows.push([38  authUtils.btn("⬅️ Main Menu", "start"),39  authUtils.btn("✕ Close", "close", "danger")40]);41 42await authUtils.renderMedia(43  keys.length ? "🔐 <b>My Keys</b>\n\nSelect an account to view its current OTP." :44               "🔐 <b>My Keys</b>\n\nYou don't have any authenticator accounts yet.",45  rows,46  "key_image"47);