A Discord Bot connected to your Pterodactyl API.
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();