initial commit

This commit is contained in:
Nico Melone
2021-06-25 23:15:48 -04:00
parent 749e6c0fea
commit 849777a026

25
elhf.py Normal file
View File

@@ -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)