A Discord Bot connected to your Pterodactyl API.
at main 13 lines 274 B view raw
1import axios from "axios"; 2 3export default async (id, signal) => { 4 try { 5 await axios.post(`/servers/${id}/power`, { 6 "signal": signal, 7 }); 8 } 9 catch (error) { 10 console.log(error.request.data.errors); 11 throw "An error occured with the request to your API..."; 12 } 13};