0% found this document useful (0 votes)
24 views

maintxfjdasdsa

discord nitro gen wont work

Uploaded by

nikerbeater
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

maintxfjdasdsa

discord nitro gen wont work

Uploaded by

nikerbeater
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

import requests

import string
import random
import time

# Configure your Discord webhook URL here


discord_webhook_url = "YOUR_DISCORD_WEBHOOK_URL"

def generate_random_string(length=18):
"""Generate a random alphanumeric string of given length."""
characters = string.ascii_letters + string.digits
return ''.join(random.choice(characters) for _ in range(length))

def send_request_to_discord_api(code):
"""Send a GET request to the Discord API with the generated code."""
url = f"https://discordapp.com/api/v9/entitlements/gift-codes/{code}?
with_application=false&with_subscription_plan=true"
response = requests.get(url)
return response

def send_to_discord_webhook(message):
"""Send a message to the configured Discord webhook."""
data = {
"content": message
}
response = requests.post(discord_webhook_url, json=data)
return response

def main():
while True:
# Generate a random 18-character alphanumeric string
code = generate_random_string()

# Send a GET request to the Discord API


response = send_request_to_discord_api(code)

# Prepare the message to be sent to the Discord webhook


message = f"Code: {code}\nResponse: {response.text}"

# Send the message to the Discord webhook


send_to_discord_webhook(message)

# Optional: Wait for a short duration before the next iteration


time.sleep(1) # Adjust the sleep duration as needed

if __name__ == "__main__":
main()

You might also like