{"id":26063829,"url":"https://github.com/decryptu/server-control","last_synced_at":"2026-04-17T23:05:21.373Z","repository":{"id":280699127,"uuid":"942852133","full_name":"Decryptu/server-control","owner":"Decryptu","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-22T08:14:58.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-10T04:36:05.842Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Decryptu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-04T19:26:41.000Z","updated_at":"2025-03-22T08:15:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"c3a965eb-594f-4df9-8115-2d753287daa9","html_url":"https://github.com/Decryptu/server-control","commit_stats":null,"previous_names":["decryptu/server-control"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Decryptu/server-control","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Decryptu%2Fserver-control","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Decryptu%2Fserver-control/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Decryptu%2Fserver-control/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Decryptu%2Fserver-control/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Decryptu","download_url":"https://codeload.github.com/Decryptu/server-control/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Decryptu%2Fserver-control/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31949435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T17:29:20.459Z","status":"ssl_error","status_checked_at":"2026-04-17T17:28:47.801Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-08T17:19:15.190Z","updated_at":"2026-04-17T23:05:21.368Z","avatar_url":"https://github.com/Decryptu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pterodactyl Panel Discord Bot\n\nA Discord bot for managing your Minecraft server hosted on Bloom Host or any Pterodactyl panel. This bot allows server administrators and users to check server status, resources usage, and perform server restarts through Discord commands.\n\n## Features\n\n- 📊 **Real-time Status Monitoring**: View server status, RAM usage, CPU usage, and player count\n- 🔄 **Server Restart Management**: Initiate, vote on, and cancel server restarts\n- 🚀 **Force Restart Option**: For admins to quickly restart the server when needed\n- 👁️ **Status Display**: Bot status shows current RAM usage\n\n## Prerequisites\n\n- A Minecraft server hosted on Bloom Host or any Pterodactyl-based hosting provider\n- A Discord server where you have admin permissions\n- Node.js (v16.9.0 or higher)\n- npm (Node package manager)\n\n## Setup Instructions\n\n### Step 1: Create a Discord Application\n\n1. Go to the [Discord Developer Portal](https://discord.com/developers/applications)\n2. Click \"New Application\" and give it a name\n3. Navigate to the \"Bot\" tab and click \"Add Bot\"\n4. Under the \"TOKEN\" section, click \"Copy\" to copy your bot token\n5. Save this token for later use\n6. Under \"Privileged Gateway Intents\", enable both \"SERVER MEMBERS INTENT\" and \"MESSAGE CONTENT INTENT\"\n7. Under the \"OAuth2\" tab, select \"bot\" in the scopes section\n8. In the bot permissions section, select:\n   - Read Messages/View Channels\n   - Send Messages\n   - Embed Links\n   - Read Message History\n   - Use Slash Commands\n9. Copy the generated URL and open it in your browser to add the bot to your server\n\n### Step 2: Get Your Pterodactyl API Key\n\n1. Login to your Pterodactyl panel (e.g., https://mc.bloom.host)\n2. Go to Account Management (bottom left corner of your dashboard)\n3. Select the \"API Credentials\" tab\n4. Create a new API key\n5. Save this API key for later use\n\n### Step 3: Set Up the Bot\n\n1. Clone this repository or download the source code\n2. Install dependencies:\n   ```bash\n   npm install\n   ```\n3. Create a `.env` file in the root directory with the following content:\n   ```\n   DISCORD_TOKEN=your_discord_bot_token_here\n   PTERODACTYL_API_KEY=your_pterodactyl_api_key_here\n   ```\n4. Update the configuration in `index.js`:\n   ```javascript\n   // Configuration\n   const API_URL = \"https://your.pterodactyl.panel/api\"; // Update with your panel URL\n   const SERVER_ID = \"your_server_id\"; // Update with your server ID\n   const MAX_RAM_GB = 12; // Update with your server's RAM allocation\n   ```\n\n### Step 4: Start the Bot\n\nRun the bot using:\n```bash\nnode index.js\n```\n\nFor production use, consider using a process manager like PM2:\n```bash\nnpm install -g pm2\npm2 start index.js --name \"minecraft-discord-bot\"\n```\n\n## Available Commands\n\n| Command | Description |\n|---------|-------------|\n| `/status` | Shows current server status, including RAM/CPU usage and player count |\n| `/restart` | Initiates a vote to restart the server with a configurable timeout |\n| `/cancel` | Cancels an ongoing restart vote |\n| `/force-restart` | Forces an immediate server restart (Admin only) |\n\n## Customization\n\nYou can customize various settings in the `index.js` file:\n\n- `VOTE_TIMEOUT`: Duration in seconds for restart votes (default: 60)\n- `MAX_RAM_GB`: Maximum RAM allocation for your server (default: 12)\n- `STATUS_UPDATE_INTERVAL`: How often to update the bot's status (default: 60000ms)\n\n## Troubleshooting\n\n- **API Connection Issues**: Ensure your API URL is correct and your API key has the proper permissions\n- **Bot Not Responding**: Check if your Discord token is correct and that the bot has proper permissions in your Discord server\n- **Command Registration Failed**: Restart the bot after adding it to a new server\n\n## Contributing\n\nContributions are welcome! Feel free to open issues or submit pull requests to improve the bot.\n\n## License\n\n[MIT License](LICENSE)\n\n## Disclaimer\n\nThis bot is not officially affiliated with Bloom Host or Pterodactyl. Use at your own risk.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecryptu%2Fserver-control","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdecryptu%2Fserver-control","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecryptu%2Fserver-control/lists"}