fixed problem regarding config variable names
This commit is contained in:
@@ -54,13 +54,13 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fetch(`${config.panel.url}/api/client/servers/${serverid}/command`,{
|
fetch(`${mainconfig.panel.url}/api/client/servers/${serverid}/command`,{
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"headers": {
|
"headers": {
|
||||||
"Accept": "application/json",
|
"Accept": "application/json",
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"Authorization": `Bearer ${await commands.get("profile_handler").getKey(interactionObject)}`,
|
"Authorization": `Bearer ${await commands.get("profile_handler").getKey(interactionObject)}`,
|
||||||
'User-Agent': `${config.panel.useragent}`,
|
'User-Agent': `${mainconfig.panel.useragent}`,
|
||||||
},
|
},
|
||||||
"body": JSON.stringify({
|
"body": JSON.stringify({
|
||||||
"command": `${command}`
|
"command": `${command}`
|
||||||
|
|||||||
@@ -73,13 +73,13 @@ module.exports = {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fetch(`${config.panel.url}/api/client/servers/${serverid}/power`,{
|
fetch(`${mainconfig.panel.url}/api/client/servers/${serverid}/power`,{
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"headers": {
|
"headers": {
|
||||||
"Accept": "application/json",
|
"Accept": "application/json",
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"Authorization": `Bearer ${await commands.get("profile_handler").getKey(interactionObject)}`,
|
"Authorization": `Bearer ${await commands.get("profile_handler").getKey(interactionObject)}`,
|
||||||
'User-Agent': `${config.panel.useragent}`,
|
'User-Agent': `${mainconfig.panel.useragent}`,
|
||||||
},
|
},
|
||||||
"body": JSON.stringify({
|
"body": JSON.stringify({
|
||||||
"signal": `${action}`
|
"signal": `${action}`
|
||||||
|
|||||||
@@ -54,25 +54,25 @@ module.exports = {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
fetch(`${config.panel.url}/api/client/servers/${serverid}`,{
|
fetch(`${mainconfig.panel.url}/api/client/servers/${serverid}`,{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"headers": {
|
"headers": {
|
||||||
"Accept": "application/json",
|
"Accept": "application/json",
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"Authorization": `Bearer ${await commands.get("profile_handler").getKey(interactionObject)}`,
|
"Authorization": `Bearer ${await commands.get("profile_handler").getKey(interactionObject)}`,
|
||||||
'User-Agent': `${config.panel.useragent}`,
|
'User-Agent': `${mainconfig.panel.useragent}`,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then(async response => {
|
.then(async response => {
|
||||||
response = await response.json()
|
response = await response.json()
|
||||||
|
|
||||||
var response2 = await fetch(`${config.panel.url}/api/client/servers/${serverid}/resources`,{
|
var response2 = await fetch(`${mainconfig.panel.url}/api/client/servers/${serverid}/resources`,{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"headers": {
|
"headers": {
|
||||||
"Accept": "application/json",
|
"Accept": "application/json",
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"Authorization": `Bearer ${await commands.get("profile_handler").getKey(interactionObject)}`,
|
"Authorization": `Bearer ${await commands.get("profile_handler").getKey(interactionObject)}`,
|
||||||
'User-Agent': `${config.panel.useragent}`,
|
'User-Agent': `${mainconfig.panel.useragent}`,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -116,13 +116,13 @@ module.exports = {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
fetch(`${config.panel.url}/api/client`,{
|
fetch(`${mainconfig.panel.url}/api/client`,{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"headers": {
|
"headers": {
|
||||||
"Accept": "application/json",
|
"Accept": "application/json",
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"Authorization": `Bearer ${await commands.get("profile_handler").getKey(interactionObject)}`,
|
"Authorization": `Bearer ${await commands.get("profile_handler").getKey(interactionObject)}`,
|
||||||
'User-Agent': `${config.panel.useragent}`,
|
'User-Agent': `${mainconfig.panel.useragent}`,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then(async response => {
|
.then(async response => {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ module.exports = {
|
|||||||
const { REST } = require('@discordjs/rest');
|
const { REST } = require('@discordjs/rest');
|
||||||
const { Routes } = require('discord-api-types/v10');
|
const { Routes } = require('discord-api-types/v10');
|
||||||
|
|
||||||
const token = config.token
|
const token = mainconfig.token
|
||||||
|
|
||||||
const commandsList = []
|
const commandsList = []
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user