diff --git a/elhf.py b/elhf.py new file mode 100644 index 0000000..2486f3d --- /dev/null +++ b/elhf.py @@ -0,0 +1,25 @@ +import requests + + +def add_command(payload, version="8", app_id="172146408801959936", auth="Bot MTcyMTQ3NTcyMjY4NDY2MTc3.VxbS6w.cAmL2HkGmy58vS-nUdrL2w3Hcto"): + + url = f"https://discord.com/api/v${version}/applications/${app_id}/commands" + + # For authorization, you can use either your bot token + headers = { + "Authorization": auth + } + + r = requests.post(url, headers=headers, json=payload) + print(r.content) + + +def delete_command(command_id, version="8", app_id="172146408801959936", auth="Bot MTcyMTQ3NTcyMjY4NDY2MTc3.VxbS6w.cAmL2HkGmy58vS-nUdrL2w3Hcto"): + url = f"https://discord.com/api/v${version}/applications/${app_id}/commands/${command_id}" + # For authorization, you can use either your bot token + headers = { + "Authorization": auth + } + + r = requests.post(url, headers=headers) + print(r.content) \ No newline at end of file