Skip to content

Code Format

Jimmy Wang edited this page Apr 27, 2023 · 2 revisions

Making changes to the code

This section explains how users can make changes to the code of the Bot. While it is helpful to know that users do not need coding knowledge, it might be useful to give a brief introduction to what the Bot does and what kind of changes users might want to make.

Code Structure

The code for the Bot is stored in the contents directory. Each file in this directory corresponds to a specific command that the Bot can execute. In these files, there is a list of items with their attributes in a JSON format. For example:

{
    "Alistair": {
      "image": "Alistair.png",
      "rarity": "Epic",
      "role": "Tank",
      "buffs": "Rally",
      "units": "Cavalry",
      "tier": "C",
      "pairings": "Emrys/Bakshi"
    },
    "Alwyn": {
      "image": "Alwyn.png",
      "rarity": "Epic",
      "role": "Control",
      "buffs": "PvP",
      "units": "Magic",
      "tier": "B",
      "pairings": "Waldyr/Liliya"
    }
...
}

Editing the Code

To make changes to the code, users can follow these steps:

  1. Open the file containing the item they want to edit.
  2. Locate the item and the attribute they want to change.
  3. Edit the attribute value as desired.
  4. Save the changes to the file.
  5. Commit and push the changes to the GitHub repository.

For example, to change Alistair's tier from C to D, users can do the following:

    "Alistair": {
      "image": "Alistair.png",
      "rarity": "Epic",
      "role": "Tank",
      "buffs": "Rally",
      "units": "Cavalry",
      "tier": "D",
      "pairings": "Emrys/Bakshi"
    },
...
}

And that's it! The Bot will now reflect the changes made to the code.

Clone this wiki locally