{"id":29773279,"url":"https://github.com/bagtoad/bestpal","last_synced_at":"2025-07-27T07:16:09.777Z","repository":{"id":302904584,"uuid":"1013900404","full_name":"BagToad/BestPal","owner":"BagToad","description":"Discord bot for r/GamerPals","archived":false,"fork":false,"pushed_at":"2025-07-20T23:46:30.000Z","size":109,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-21T00:08:57.356Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/BagToad.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,"zenodo":null}},"created_at":"2025-07-04T16:54:00.000Z","updated_at":"2025-07-20T22:02:13.000Z","dependencies_parsed_at":"2025-07-04T17:48:51.158Z","dependency_job_id":"89d49b0f-07c9-41b9-8b99-07561a4ce044","html_url":"https://github.com/BagToad/BestPal","commit_stats":null,"previous_names":["bagtoad/bestpal"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BagToad/BestPal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BagToad%2FBestPal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BagToad%2FBestPal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BagToad%2FBestPal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BagToad%2FBestPal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BagToad","download_url":"https://codeload.github.com/BagToad/BestPal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BagToad%2FBestPal/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267320329,"owners_count":24068528,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-07-27T07:16:07.665Z","updated_at":"2025-07-27T07:16:09.767Z","avatar_url":"https://github.com/BagToad.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Best Pal\n\nBuilt for [r/GamerPals](https://www.reddit.com/r/GamerPals).\n\nIt's a work in progress.\n\n## Project Structure\n\nThis project follows Go's standard directory layout:\n\n```\ngamerpal/\n├── cmd/\n│   └── gamerpal/           # Main application entry point\n│       └── main.go\n├── internal/               # Private application code\n│   ├── bot/               # Bot core functionality\n│   │   └── bot.go\n│   ├── commands/          # Slash command handlers\n│   │   ├── handler.go     # Command registration and routing\n│   │   ├── help.go        # Help command\n│   │   ├── ping.go        # Ping command\n│   │   ├── prune.go       # Prune inactive users command\n│   │   ├── say.go         # Anonymous message command\n│   │   └── userstats.go   # User statistics command\n│   ├── config/            # Configuration management\n│   │   ├── config.go      # Configuration loading\n│   │   └── config_test.go # Configuration tests\n│   └── utils/             # Internal utility functions\n│       ├── members.go     # Member management utilities\n│       ├── perms.go       # Permission checking utilities\n│       └── types.go       # Type helper functions\n├── pkg/                   # Public library code (currently empty)\n├── bin/                   # Compiled binaries (gitignored)\n├── .env                   # Environment variables (gitignored)\n├── .env.example          # Environment variables template\n├── Dockerfile            # Docker configuration\n├── Makefile             # Build automation\n├── LICENSE              # MIT License\n├── USAGE.md             # Usage documentation\n└── go.mod               # Go module definition\n```\n\n## Features\n\nTODO\n\n## Slash Commands\n\n| Command | Description | Permissions |\n|---------|-------------|-------------|\n| `/userstats` | Shows member counts, growth metrics, and regional breakdown | Admin roles or Administrator permission |\n| `/ping` | Check if the bot is responsive | Admin roles or Administrator permission |\n| `/prune-inactive` | Remove users without any roles (dry run by default) | Administrator permission |\n| `/say` | Send an anonymous message to a specified channel | Administrator permission |\n| `/help` | Display all available commands | Admin roles or Administrator permission |\n\n## Quick Start\n\n### Prerequisites\n\n- Go 1.23 or higher\n- A Discord bot token (see [Discord Developer Portal](https://discord.com/developers/applications))\n\n### Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/bagtoad/gamerpal.git\n   cd gamerpal\n   ```\n\n2. Install dependencies:\n   ```bash\n   make deps\n   ```\n\n3. Configure your bot:\n   ```bash\n   cp .env.example .env\n   # Edit .env with your bot token\n   ```\n\n4. Build and run:\n   ```bash\n   make run\n   ```\n\n## Development\n\n### Building\n\n```bash\n# Build the application\nmake build\n\n# Build for multiple platforms\nmake build-all\n\n# Clean build artifacts\nmake clean\n```\n\n### Running\n\n```bash\n# Run the bot\nmake run\n```\n\n### Testing\n\n```bash\n# Run tests\nmake test\n```\n\n### Docker\n\n```bash\n# Build Docker image\nmake docker-build\n\n# Run with Docker\nmake docker-run\n```\n\n## Configuration\n\nThe bot uses environment variables for configuration:\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `DISCORD_BOT_TOKEN` | Your Discord bot token | *required* |\n\n## Bot Permissions\n\nThe bot requires the following permissions:\n- ✅ **Use Slash Commands**\n- ✅ **View Channels**\n- ✅ **Send Messages**\n- ✅ **Read Server Members** (for user statistics and prune functionality)\n- ✅ **Kick Members** (for prune functionality)\n\n\n## Important Notes\n\n- **Slash Commands**: This bot uses Discord's modern slash commands system. Commands appear in the Discord command picker when you type `/`\n- **Auto-Registration**: Commands are automatically registered when the bot starts and unregistered when it shuts down\n- **Global Commands**: Commands are registered globally and may take up to 1 hour to appear in all servers\n\n## Adding New Commands\n\nTo add a new slash command:\n\n1. Add the command definition to `RegisterCommands()` in `internal/commands/handler.go`\n2. Add a case for the command in `HandleInteraction()`\n3. Create a new file in `internal/commands/` with your command handler (following the pattern `handle{CommandName}`)\n4. Implement permission checking if needed using utilities from `internal/utils/perms.go`\n5. The command will be automatically registered when the bot starts\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Run tests and ensure code quality\n5. Submit a pull request\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Support\n\nFor support, please create an issue in the GitHub repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbagtoad%2Fbestpal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbagtoad%2Fbestpal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbagtoad%2Fbestpal/lists"}