{"id":27654349,"url":"https://github.com/freecode911/pteroserverbot","last_synced_at":"2025-04-24T05:39:10.953Z","repository":{"id":288999114,"uuid":"969587518","full_name":"FreeCode911/PteroServerBot","owner":"FreeCode911","description":"PteroServerBot A powerful Discord bot for managing Pterodactyl Panel servers with user authentication, server creation, and built-in resource templates.","archived":false,"fork":false,"pushed_at":"2025-04-22T06:34:11.000Z","size":113,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-24T05:39:08.050Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FreeCode911.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-04-20T13:49:10.000Z","updated_at":"2025-04-22T06:35:56.000Z","dependencies_parsed_at":"2025-04-21T12:45:36.245Z","dependency_job_id":null,"html_url":"https://github.com/FreeCode911/PteroServerBot","commit_stats":null,"previous_names":["freecode911/pterodactylbot","freecode911/pteroserverbot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreeCode911%2FPteroServerBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreeCode911%2FPteroServerBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreeCode911%2FPteroServerBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreeCode911%2FPteroServerBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FreeCode911","download_url":"https://codeload.github.com/FreeCode911/PteroServerBot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250573286,"owners_count":21452337,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-04-24T05:39:10.480Z","updated_at":"2025-04-24T05:39:10.937Z","avatar_url":"https://github.com/FreeCode911.png","language":"Python","readme":"# PteroServerBot\n\nA Discord bot for managing Pterodactyl Panel servers. This bot allows users to link their Discord accounts to the Pterodactyl Panel and create game servers with predefined resource configurations.\n\n## Features\n\n- `/link` command: Authenticates users and links their Discord account to the Pterodactyl Panel\n- `/create` command: Creates a new server based on predefined templates\n- `/delete` command: Delete one of your servers\n- `/reset-password` command: Reset your Pterodactyl panel password\n- `/panel-info` command: Get information about the Pterodactyl panel configuration\n- `/servers` command: Lists all servers owned by the user\n- `/templates` command: Lists all available server templates with their specifications\n- User limit: Each user can create up to 2 servers\n- Automatic allocation creation: The bot automatically finds available nodes and allocations\n\n## Prerequisites\n\n- Python 3.8 or higher\n- A Discord bot token\n- A Pterodactyl Panel with API access\n\n## Installation\n\n1. Clone this repository:\n   ```\n   git clone https://github.com/FreeCode911/PteroServerBot.git\n   cd PteroServerBot\n   ```\n\n2. Create a virtual environment and install dependencies:\n   ```\n   python -m venv venv\n   source venv/bin/activate  # On Windows: venv\\Scripts\\activate\n   pip install -r requirements.txt\n   ```\n\n3. Create a `.env` file based on `.env.example` and fill in your credentials:\n   ```\n   cp .env.example .env\n   # Edit the .env file with your favorite text editor\n   ```\n\n4. Configure your server templates in `config.py` according to your needs.\n\n## Setting up the Discord Bot\n\n1. Go to the [Discord Developer Portal](https://discord.com/developers/applications)\n2. Create a new application\n3. Go to the \"Bot\" tab and create a bot\n4. Enable the \"Message Content Intent\" under Privileged Gateway Intents\n5. Copy the bot token and add it to your `.env` file\n6. Go to the \"OAuth2\" tab\n7. Under \"URL Generator\", select the following scopes:\n   - `bot`\n   - `applications.commands`\n8. Under \"Bot Permissions\", select:\n   - \"Send Messages\"\n   - \"Embed Links\"\n   - \"Use Slash Commands\"\n9. Copy the generated URL and use it to invite the bot to your server\n\n## Setting up Pterodactyl API\n\n1. Log in to your Pterodactyl Panel as an administrator\n2. Go to \"Application API\" in the admin area\n3. Create a new API key with the following permissions:\n   - Users: Read \u0026 Write\n   - Servers: Read \u0026 Write\n   - Allocations: Read\n   - Locations: Read\n   - Nests: Read\n4. Copy the API key and add it to your `.env` file\n\n## Usage\n\n1. Start the bot:\n   ```\n   python main.py\n   ```\n\n2. In Discord, use the following commands:\n   - `/link` - Link your Discord account to Pterodactyl\n   - `/templates` - View available server templates\n   - `/create \u003ctemplate\u003e` - Create a new server with the specified template\n   - `/servers` - List all your servers\n\n## Customizing Server Templates\n\nYou can customize the server templates in the `config.py` file. Each template defines the resources allocated to the server, such as RAM, CPU, and disk space.\n\nExample:\n```python\nSERVER_TEMPLATES = {\n    'softerwire': {\n        'name': 'Softerwire',\n        'description': 'Softerwire Server',\n        'memory': 4096,  # RAM in MB\n        'disk': 2048,    # Disk space in MB\n        'cpu': 200,      # CPU limit (300 = 3 cores)\n        'nest': 5,       # Nest ID (default is 1 for Minecraft)\n        'egg': 25,       # Egg ID (default is 1 for Vanilla Minecraft)\n    },\n    # Add more templates as needed\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreecode911%2Fpteroserverbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreecode911%2Fpteroserverbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreecode911%2Fpteroserverbot/lists"}