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/_broadcast_buttons_input.js
javascript · 35 lines
1/**#command2name: /broadcast_buttons_input3answer: 4keyboard: 5parse_mode: html6aliases: broadcast_buttons_input7allow_only_group: false8need_reply: true9is_web: 010#command**/11 12/* Command: /broadcast_buttons_input */13if (!(await authUtils.adminOnly())) return;14const raw=String(message||"").trim();15if(!raw){ await Bot.runCommand("/broadcast_send"); return; }16 17const parts=raw.split(",").map(x=>x.trim()).filter(Boolean);18const parsed=[];19for(const part of parts){20 const i=part.indexOf(":");21 if(i<=0)continue;22 const text=part.slice(0,i).trim();23 const url=part.slice(i+1).trim();24 if(text && /^https?:\/\/\S+$/i.test(url))parsed.push({text,url});25}26if(!parsed.length){27 await Api.sendMessage({chat_id:chat.id,text:"❌ No valid buttons found. Use <code>Name: https://example.com</code>.",parse_mode:"HTML"});28 await Bot.runCommand("/broadcast_buttons_prompt");29 return;30}31const d=await db.user.get("broadcast_draft",{});32d.buttons=[];33for(let i=0;i<parsed.length;i+=2)d.buttons.push(parsed.slice(i,i+2));34await db.user.set("broadcast_draft",d);35await Bot.runCommand("/broadcast_send");