├── README.md ├── requirements.txt └── run.py /README.md: -------------------------------------------------------------------------------- 1 | # Discord Application Generator (+ bot generator) 2 | 3 | ### How-to 4 | 5 | Run `pip install -r requirements.txt`, then `python run.py` ! 6 | 7 | Enjoy ;) ! 8 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | requests 2 | -------------------------------------------------------------------------------- /run.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import json 3 | 4 | email = input('Email : ') 5 | password = input('Password : ') 6 | 7 | payload = { 8 | 'email': email, 9 | 'password': password 10 | } 11 | req = requests.post(url='https://discordapp.com/api/auth/login', json=payload) 12 | 13 | if req.status_code != 200: 14 | print('Error :/') 15 | exit(1) 16 | token = req.json()['token'] 17 | app_name = input('Application name : ') 18 | description = input('Application description : ') 19 | redirect_uri1 = input('Redirect URI 1 : ') 20 | redirect_uri2 = input('Redirect URI 2 : ') 21 | 22 | 23 | headers = {'Authorization': token} 24 | payload = { 25 | 'name': app_name, 26 | 'description': description, 27 | 'redirect_uris': [redirect_uri1, redirect_uri2] 28 | } 29 | req = requests.post(url='https://discordapp.com/api/oauth2/applications', \ 30 | headers=headers, 31 | json=payload) 32 | if req.status_code != 201: 33 | print('Error :/') 34 | exit(1) 35 | 36 | print('Storing bot details in {}.json'.format('app_name')) 37 | with open('{}.json'.format('app_name'), 'w+') as f: 38 | f.write(req.text) 39 | 40 | req = requests.post('https://discordapp.com/api/oauth2/applications/{}/bot'.format(req.json()['id']), 41 | headers=headers, 42 | json="" 43 | ) 44 | 45 | if req.status_code != 200: 46 | print('Error :/') 47 | exit(1) 48 | 49 | print('Storing application details in {}-bot.json'.format('app_name')) 50 | with open('{}-bot.json'.format('app_name'), 'w+') as f: 51 | f.write(req.text) 52 | 53 | print('Bye ! o/') 54 | --------------------------------------------------------------------------------