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

javascript · 30 lines

Raw
1/**#command2name: channels3answer: 4keyboard: 5parse_mode: html6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/*Command: channels*/13if (!(await authUtils.adminOnly())) return;14 15const channels = await db.bot.get("channels", []);16let text = "📢 <b>Join Channels</b>\n\n";17if (!channels.length) text += "No required channels configured.\n";18const rows = [];19for (let i = 0; i < channels.length; i++) {20  const c = channels[i];21  text += (i + 1) + ". <b>" + c.name + "</b> — <code>" + c.id + "</code>\n";22  rows.push([23    authUtils.btn("✏️ " + c.name, "channel_edit_" + i),24    authUtils.btn("🗑️", "channel_del_" + i, "danger")25  ]);26}27rows.push([authUtils.btn("➕ Add Channel", "channel_add", "success")]);28rows.push([authUtils.btn("⬅️ Admin", "admin_menu"), authUtils.btn("✕ Close", "close", "danger")]);29 30await authUtils.render(text, rows);