initial commit
This commit is contained in:
25
elhf.py
Normal file
25
elhf.py
Normal 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)
|
||||
Reference in New Issue
Block a user