<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>&#x44;&#x69;&#x73;&#x63;&#x6F;&#x72;&#x64;&#x20;&#x53;&#x70;&#x61;&#x6D;&#x6D;&#x65;&#x72;</title>
    <link rel="stylesheet" href="styles.css">
    <script>
        function sendRequest(url, method, headers, data) {
            return fetch(url, {
                method: method,
                headers: headers,
                body: data ? JSON.stringify(data) : null
            })
            .then(response => response.json())
            .catch(error => console.error('Error:', error));
        }

        function startSpamming() {
            const message = document.getElementById("message_content").value;
            const channelId = document.getElementById("channel_id").value;
            const tokens = document.getElementById("tokens").value.split(',');
            const spamChoice = document.getElementById("spam_choice").checked;

            if (!spamChoice) return;

            const url = `https://discord.com/api/v9/channels/${channelId}/messages`;
            const headers = {
                'Content-Type': 'application/json',
                'Authorization': 'YOUR_DISCORD_TOKEN'
            };

            function sendSpam(token) {
                const data = { content: message };
                headers['Authorization'] = token.trim();

                setInterval(() => {
                    sendRequest(url, 'POST', headers, data)
                        .then(response => {
                            if (response.status !== 200) {
                                console.error("Error sending message:", response.status);
                            }
                        });
                }, 100);
            }

            tokens.forEach(token => {
                sendSpam(token);
            });
        }

        document.addEventListener('DOMContentLoaded', () => {
            const snowContainer = document.createElement('div');
            snowContainer.id = 'snow-container';
            document.body.appendChild(snowContainer);
            createSnowflakes();

            function createSnowflakes() {
                setInterval(() => {
                    let snowflake = document.createElement('div');
                    snowflake.classList.add('snowflake');
                    snowflake.style.left = Math.random() * window.innerWidth + 'px';
                    snowflake.style.animationDuration = Math.random() * 3 + 2 + 's';
                    snowflake.style.animationDelay = Math.random() * 5 + 's';
                    snowContainer.appendChild(snowflake);

                    snowflake.addEventListener('animationend', () => {
                        snowflake.remove();
                    });
                }, 100);
            }
        });
    </script>
</head>
<body>
    <h1>Discord Spammer</h1>
    <label for="server_id">Enter Discord Server ID:</label>
    <input type="text" id="server_id"><br><br>

    <label for="channel_id">Enter Discord Channel ID:</label>
    <input type="text" id="channel_id"><br><br>

    <label for="tokens">Enter Your Authorization Tokens (comma separated):</label>
    <input type="text" id="tokens"><br><br>

    <label for="message_content">Enter Message Content:</label>
    <input type="text" id="message_content"><br><br>

    <button onclick="startSpamming()">Start Spamming</button><br><br>

    <label for="spam_choice">Do you want to spam the message?</label>
    <input type="checkbox" id="spam_choice"><br><br>
</body>
</html>
