Discord Bot Banner with Python import requests import base64 import os token = "bot_token" #Your Bot token path = "file.png" #The path to your image file def file_type(image_path): name, extension = os.path.splitext(image_path) return extension[1:] with open(path, 'rb') as f: image = f.read() encoded_img = base64.b64encode(image).decode('utf-8') file_extension = file_type(path) data = f'data:image/{file_extension};base64,{encoded_img}' headers = { "Authorization": f"Bot {token}", "Content-Type": "application/json", } payload = { "banner": data } response = requests.patch("https://discord.com/api/v10/users/@me", headers=headers, json=payload) if response.status_code == 200: print("Success.") else: print(response.json()) Instructions Put your Bot token inside the token variable. Specify the path to your image file in the path variable. To make things easier, put the file in the same directory where the script is located. Run the script.