Skip to content

Conversation

Trophy198
Copy link
Contributor

@Trophy198 Trophy198 commented Mar 23, 2025

Add in-game tracker management commands and i18n support

✨ Overview

This PR introduces in-game tracker management commands that allow users to add or remove players from trackers directly through in-game chat.
Additionally, i18n support has been added for multilingual message feedback.


✅ New Commands

➕ Create Tracker Command

  • trackerId (optional): If omitted, a new tracker will be automatically created.
  • Examples:
    • .tracker create rustplusplus
    • .tracker create

➕ Add Player Command

  • playerId: SteamID64 or Battlemetrics Player ID.
  • trackerId (optional): If omitted, the most recently created tracker linked to the current server is used.
  • Examples:
    • .tracker add 76561198000000001
    • .tracker add 76561198000000001 24

➖ Remove Player Command

  • playerId: SteamID64 or Battlemetrics Player ID.
  • trackerId (optional): If omitted, the most recently created tracker linked to the current server is used.
  • Examples:
    • .tracker remove 76561198000000001
    • .tracker remove 76561198000000001 24

⚙️ How It Works

  1. Create Command (create)

    • If trackerId is omitted in create commands, a new tracker will be automatically created when needed.
    • Initializes a new tracker for the current server.
    • Generates a Discord embed message to visually represent the tracker.
  2. Add Command (add)

    • If trackerId is omitted, it automatically selects the most recently created tracker on the current server.
    • Retrieves the player's name from Steam if a SteamID64 is provided.
    • Checks for duplicate entries before adding the player.
    • Updates the Discord tracker embed message after the player is added.

3.. Remove Command (remove)

  • If trackerId is omitted, it selects the most recently created tracker on the current server.
  • Verifies if the player exists in the tracker before removing.
  • Updates the Discord tracker embed message after removal.

More

  1. Edit Tracker Modal

Edit Tracker ID (Modal)

  • When editing a tracker, trackerId can now be changed via the modal.
  • On trackerId update:
    • The instance is updated.
    • The old tracker entry is deleted.
    • The Discord embed message is updated with the new ID.

🌍 i18n Support

New keys have been added to the en.json file to support multilingual messages:

Image

image
image

@nachogrxdev
Copy link

Very useful! Great contribution. Looking forward to merging! 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants