import requests
import json
import argparse
import threading
from concurrent.futures import ThreadPoolExecutor

# Replace with your Discord webhook URL
WEBHOOK_URL = 'https://discord.com/api/webhooks/1491924749742248127/WYbwnfG-1UMtBDD2YXu4kh2uK8d_3GTKm9-PG0wTbSaNRBAZa0kod08r_C6fI62t4xPp'

def send_discord_webhook(message):
    """Send a single message to Discord webhook."""
    data = {
        'content': message
    }
    
    try:
        response = requests.post(
            WEBHOOK_URL,
            data=json.dumps(data),
            headers={'Content-Type': 'application/json'},
            timeout=5
        )
        if response.status_code == 204:
            print('.', end='', flush=True)
            return True
        else:
            print(f'\nFailed: {response.status_code} - {response.text}', flush=True)
            return False
    except Exception as e:
        print(f'\nError: {e}', flush=True)
        return False

def main():
    parser = argparse.ArgumentParser(description='Super fast Discord webhook spammer.')
    parser.add_argument('--message', '-m', default='yo wsg bruva', help='Message to send (default: Hi!)')
    parser.add_argument('--amount', '-a', type=int, default=100, help='Number of messages to send (default: 100)')
    
    args = parser.parse_args()
    
    print(f'Sending {args.amount} messages super fast (threaded, no delay)...')
    
    # Use threads for super fast parallel sending
    with ThreadPoolExecutor(max_workers=20) as executor:
        futures = [executor.submit(send_discord_webhook, args.message) for _ in range(args.amount)]
        for future in futures:
            future.result()  # Wait for all
    
    print('\nDone! Dots show successful sends.')

if __name__ == '__main__':
    main()
