Permission Encoder
Encode Discord Permission Names to return the bitfield flag of it.
Request Information
POST https://exorion.xyz/api/discord/permission-encoder
https://exorion.xyz/api/discord/permission-encoderCode Examples
import requests
url = "https://exorion.xyz/api/discord/permission-encoder"
headers = {
"Authorization": "API_KEY", # Your Server API Key from /settings
"Content-Type": "application/json"
}
payload = {
"permissions": ["ADMINISTRATOR", "BAN_MEMBERS"]
}
response = requests.post(url, headers=headers, json=payload)
print(response.status_code)
print(response.json())const fetch = require("node-fetch"); // or in browser use global fetch
const url = "https://exorion.xyz/api/discord/permission-encoder";
const payload = {
permissions: ["ADMINISTRATOR", "BAN_MEMBERS"]
};
fetch(url, {
method: "POST",
headers: {
"Authorization": "API_KEY", // Your Server API Key from /settings
"Content-Type": "application/json"
},
body: JSON.stringify(payload)
})
.then(res => res.json())
.then(console.log)
.catch(console.error);Last updated