<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Send to Discord Webhook</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            background-color: #2c2f33;
            color: #ffffff;
        }

        .container {
            text-align: center;
            background-color: #23272a;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
        }

        input, button {
            margin: 10px 0;
            padding: 10px;
            border: none;
            border-radius: 4px;
            font-size: 16px;
        }

        input {
            width: 80%;
        }

        button {
            background-color: #7289da;
            color: white;
            cursor: pointer;
        }

        button:hover {
            background-color: #5b6eae;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>Send Message to Discord</h1>
        <input id="messageInput" type="text" placeholder="Enter your message here">
        <button onclick="sendMessage()">Send</button>
        <p id="status"></p>
    </div>

    <script>
        const webhookURL = "https://discord.com/api/webhooks/1326515022872055848/nD1OzjJv0PI6yAdEhJnaFYcg1b-Wc-WKNEYQ2SndK-ONHQ2lakrwsU7bN1g8IwWuqB6c"; // Replace with your webhook URL

        async function sendMessage() {
            const message = document.getElementById('messageInput').value;
            const status = document.getElementById('status');

            if (!message) {
                status.textContent = "Message cannot be empty!";
                status.style.color = "red";
                return;
            }

            const payload = JSON.stringify({ content: message });

            try {
                const response = await fetch(webhookURL, {
                    method: "POST",
                    headers: {
                        "Content-Type": "application/json"
                    },
                    body: payload
                });

                if (response.ok) {
                    status.textContent = "Message sent successfully!";
                    status.style.color = "green";
                    document.getElementById('messageInput').value = '';
                } else {
                    status.textContent = "Failed to send message!";
                    status.style.color = "red";
                }
            } catch (error) {
                status.textContent = "An error occurred!";
                status.style.color = "red";
            }
        }
    </script>
</body>
</html>