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

javascript · 27 lines

Raw
1/**#command2name: /ban_input3answer: 4keyboard: 5parse_mode: html6aliases: ban_input7allow_only_group: false8need_reply: true9is_web: 010#command**/11 12/* Command: /ban_input */13if (!(await authUtils.adminOnly())) return;14const id=String(message||"").trim();15if(!/^\d+$/.test(id)){16  await Api.sendMessage({chat_id:chat.id,text:"❌ Invalid user ID. Please send digits only.",parse_mode:"HTML"});17  await Bot.runCommand("/ban_prompt"); return;18}19if(id===await authUtils.getAdminId()){20  await Api.sendMessage({chat_id:chat.id,text:"❌ The configured administrator cannot be banned.",parse_mode:"HTML"});21  return;22}23await db.user.set("banned",true,{user_id:Number(id)});24await Api.sendMessage({25  chat_id:chat.id,text:`🚫 User <code>${id}</code> has been banned.`,parse_mode:"HTML",26  reply_markup:{inline_keyboard:[[authUtils.btn("✅ Unban","unban_user_"+id,"success"),authUtils.btn("⬅️ Admin","admin_menu")]]}27});