A Discord Bot connected to your Pterodactyl API.
at main 14 lines 488 B view raw
1import { Bot } from "./services/Bot.js"; 2import axios from "axios"; 3import { config } from "dotenv"; 4config(); 5 6// Define base config for axios 7axios.defaults.baseURL = `${process.env.PTERO_HOST}/api/client` ; 8axios.defaults.headers.common["Authorization"] = `Bearer ${process.env.PTERO_TOKEN}`; 9axios.defaults.headers.common["Accept"] = "application/json"; 10axios.defaults.headers.common["Content-Type"] = "application/json"; 11 12// Generate and launch Bot 13const bot = new Bot(); 14bot.run();