Azuy's picture
帮我做一个telegram的机器人
d9a48e0 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Telegram Bot Dashboard</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
</head>
<body class="bg-gray-100 min-h-screen">
<custom-navbar></custom-navbar>
<div class="container mx-auto px-4 py-8">
<div class="flex flex-col lg:flex-row gap-8">
<!-- Sidebar -->
<custom-sidebar></custom-sidebar>
<!-- Main Content -->
<div class="flex-1">
<div class="bg-white rounded-xl shadow-md p-6 mb-8">
<h1 class="text-3xl font-bold text-gray-800 mb-6">Telegram Bot Dashboard</h1>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<!-- Bot Stats Card -->
<div class="bg-blue-50 rounded-lg p-6 shadow-sm">
<div class="flex items-center justify-between mb-4">
<h2 class="text-lg font-semibold text-blue-800">Bot Statistics</h2>
<i data-feather="bar-chart-2" class="text-blue-600"></i>
</div>
<div class="space-y-3">
<div>
<p class="text-sm text-blue-700">Total Users</p>
<p class="text-2xl font-bold text-blue-900">1,248</p>
</div>
<div>
<p class="text-sm text-blue-700">Active Today</p>
<p class="text-2xl font-bold text-blue-900">327</p>
</div>
</div>
</div>
<!-- Commands Card -->
<div class="bg-green-50 rounded-lg p-6 shadow-sm">
<div class="flex items-center justify-between mb-4">
<h2 class="text-lg font-semibold text-green-800">Bot Commands</h2>
<i data-feather="command" class="text-green-600"></i>
</div>
<div class="space-y-3">
<div>
<p class="text-sm text-green-700">Total Commands</p>
<p class="text-2xl font-bold text-green-900">12</p>
</div>
<div>
<p class="text-sm text-green-700">Most Used</p>
<p class="text-2xl font-bold text-green-900">/help</p>
</div>
</div>
</div>
<!-- Recent Activity -->
<div class="bg-purple-50 rounded-lg p-6 shadow-sm">
<div class="flex items-center justify-between mb-4">
<h2 class="text-lg font-semibold text-purple-800">Recent Activity</h2>
<i data-feather="activity" class="text-purple-600"></i>
</div>
<div class="space-y-3">
<div>
<p class="text-sm text-purple-700">New Users (24h)</p>
<p class="text-2xl font-bold text-purple-900">43</p>
</div>
<div>
<p class="text-sm text-purple-700">Messages</p>
<p class="text-2xl font-bold text-purple-900">1,892</p>
</div>
</div>
</div>
</div>
</div>
<!-- Bot Configuration Section -->
<div class="bg-white rounded-xl shadow-md p-6">
<h2 class="text-2xl font-bold text-gray-800 mb-6">Bot Configuration</h2>
<div class="space-y-6">
<div>
<h3 class="text-lg font-semibold text-gray-700 mb-3">Bot Token</h3>
<div class="flex items-center space-x-2">
<input type="password" class="flex-1 border border-gray-300 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" value="123456789:ABCDEFGHIJKLMNOPQRSTUVWXYZ">
<button class="bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition">
<i data-feather="refresh-cw" class="w-4 h-4"></i>
</button>
<button class="bg-green-600 text-white px-4 py-2 rounded-lg hover:bg-green-700 transition">
<i data-feather="copy" class="w-4 h-4"></i>
</button>
</div>
</div>
<div>
<h3 class="text-lg font-semibold text-gray-700 mb-3">Webhook URL</h3>
<div class="flex items-center space-x-2">
<input type="text" class="flex-1 border border-gray-300 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" value="https://yourdomain.com/webhook">
<button class="bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition">
<i data-feather="refresh-cw" class="w-4 h-4"></i>
</button>
<button class="bg-green-600 text-white px-4 py-2 rounded-lg hover:bg-green-700 transition">
<i data-feather="copy" class="w-4 h-4"></i>
</button>
</div>
</div>
<div class="flex justify-end">
<button class="bg-blue-600 text-white px-6 py-2 rounded-lg hover:bg-blue-700 transition flex items-center space-x-2">
<i data-feather="save" class="w-4 h-4"></i>
<span>Save Changes</span>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<custom-footer></custom-footer>
<script src="components/navbar.js"></script>
<script src="components/sidebar.js"></script>
<script src="components/footer.js"></script>
<script src="script.js"></script>
<script>
feather.replace();
</script>
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
</body>
</html>