diff --git a/README.md b/README.md index ba59d64..d9316e4 100644 --- a/README.md +++ b/README.md @@ -22,113 +22,7 @@ and events, facilitating better communication and management. ## Installation and Usage -### Initial Setup - -Follow these instructions to start a new bridge bot instance: - -1. **Install Docker:** [Instructions Here](https://docs.docker.com/engine/install/#installation-procedures-for-supported-platforms) - -2. **Copy the Docker Compose File:** - ```bash - curl https://raw.githubusercontent.com/SkyKings-Network/GuildBridgeBot/refs/heads/main/compose.yml > compose.yml - ``` - -3. **Update the settings for your compose file as needed:** - ```bash - nano compose.yml - ``` - -4. **Start the Bot:** - ```bash - docker compose -f compose.yml up -d - ``` - -If you are running the bot for the first time, you will need to log in with a Minecraft account. -To do this, check the logs of the bot container to get the link to log in: -```bash -docker compose logs -n 50 -``` - -### Running multiple bridge bots -To run multiple bridge bots, you will need to add on to your docker compose file. -Each bot will need its own service definition. - -1. **Open your compose file:** - ```bash - nano compose.yml - ``` - -2. **Add a new service for each additional bot:** - ```yaml - bot2: - image: skykingsnetwork/guildbridgebot:latest - container_name: guildbridgebot2 - restart: unless-stopped - environment: - - BRIDGE_USE_ENV_CONFIG=true - - BRIDGE_ACCOUNT_EMAIL= - - BRIDGE_DISCORD_TOKEN= - - BRIDGE_DISCORD_CHANNEL= - ``` - -3. **Update the environment variables for each bot accordingly.** -4. **Save and exit the file.** -5. **Restart the docker compose setup:** - ```bash - docker compose -f compose.yml up -d - ``` - -### Configuration - -The bot can be configured using environment variables or a `config.json` file. -To use a file, mount it into the Docker container at `/Bot/config.json`. For example: -```yaml -volumes: - - ./config.json:/Bot/config.json -``` - -### Updating the Bot -To update the bot to the latest version, run the following commands: -```bash -docker compose -f compose.yml pull -docker compose -f compose.yml up -d -``` - -## Commands - -### Guild Management - -| Command | Description | -|---------|-------------| -| `!invite ` | Invite a player to the guild | -| `!kick [reason]` | Kick a player from the guild | -| `!promote ` | Promote a guild member | -| `!demote ` | Demote a guild member | -| `!setrank ` | Set a member's rank | -| `!mute ` | Mute a guild member | -| `!unmute ` | Unmute a guild member | - -### Communication Control - -| Command | Description | -|---------|-------------| -| `!notifications` | Toggle join/leave notifications | -| `!toggleaccept` | Toggle auto-accepting guild invites | - -### Miscellaneous - -| Command | Description | -|---------|-------------| -| `!help` | Display all available commands and bot information | -| `!online` | Check online guild members | -| `!list` | Show a list of all guild members | -| `!top` | Shows xperience ranking of members for the day | -| `!info` | Shows Guild Information | -| `!override ` | Force the bot to use a given command | - -Note: Some commands may require appropriate permissions in both Discord and the Hypixel guild. - ---- +**For installation, usage, and configuration, please read the wiki: https://github.com/SkyKings-Network/GuildBridgeBot/wiki** ## Troubleshooting diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..3eb40d0 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,3 @@ +# Security Policy + +To report a security vulnerability, open a ticket on our Discord server: https://discord.gg/skykings. diff --git a/extensions/game_commands/game_commands.py b/extensions/game_commands/game_commands.py index 94158a0..c6d37d8 100644 --- a/extensions/game_commands/game_commands.py +++ b/extensions/game_commands/game_commands.py @@ -198,6 +198,8 @@ async def level(self, name, args, *, officer: bool = False, head: str = None): if not data["success"]: return await chat_msg(f"Failed to get {player}'s profile.") profiles = data["profiles"] + if not profiles: + return await chat_msg(f"{player} has no profiles.") if profile is None: profile = [p for p in profiles if p.get("selected")] if not profile: @@ -236,6 +238,8 @@ async def slayers(self, name, args, *, officer: bool = False, head: str = None): if not data["success"]: return await chat_msg(f"Failed to get {player}'s profile.") profiles = data["profiles"] + if not profiles: + return await chat_msg(f"{player} has no profiles.") if profile is None: profile = [p for p in profiles if p.get("selected")] if not profile: