Skip to content

IndiSpark's Monorepo Fork Guide:

Welcome to IndiSpark's Monorepo Fork Guide!

Our two main projects are Brave Bot and our website. We use uv to manage the Python Versions installed, the packages used and more. Please ensure you install uv before forking our monorepo.

Download / Cloning Guide:

Clone with SSH: Click Here

git@gitlab.com:indispark/brave-bot.git

Clone with HTTPS: Click Here

https://gitlab.com/indispark/brave-bot.git

Warning

Cloning our repository is not recommended unless you are a experienced developer. We also do not guarantee our repository to be stable 24/7.

Download a specific Version:

You can also download a specific version of our monorepo. Click Here

Brave Bot Fork Guide:

Once you have downloaded the latest version of our monorepo from GitLab, please do the following:

  1. Apply the following file changes:
    1. Create a DB file named maindb.sqlite.
    2. Rename example.yml to config.yml.
    3. Create an .env file and follow our Token Storage Guide. Click Here
  2. You now need to setup and configure your config.yml.
    1. The following ID Fields are required:
      1. Server ID
      2. Owner ID
      3. There is also other optional ID Fields. Either set them to False or leave them empty. Do NOT delete them.
        1. Logs Channel ID
        2. Rules Channel ID
        3. Main Source Code Project ID
      4. You can also add Co Bot Owners via the Co Bot Owners list field (add the IDs).
    2. You also must set the Policy URL, Bot Name and Support Server Invite URL fields in your config.yml.
      • We by default send users to our Docs (this website). To change this you must update the codebase.
    3. Configure Overrides. Learn More
      • The Fork Override should be kept as True. This is so the respective credits are given.
      • If you have enabled the Error Tracking Override (Using the Sentry SDK) you will need to update your .env to have your Sentry DSN. Example .env with DSN and Bot Token
      • If you plan on enabling the Topia Override. Please ensure you enable the Setup Database Boot Mode Override for the first boot. This is so your database is set-up and configured correctly.
      • If you use our example.yml, configuration is partly completed for you.
    4. Emoji IDs.
      • All of the Emoji fields are pre-filled with emoji IDs from the IndiSpark Server. All emoji fields are required.
    5. Add Custom Tips.
      • In the Custom Tips list field, you can add custom tips that you wanna add alongside the baseline tips that are written in tips.py (In the utils Folder).
  3. Deploy your bot.
    1. If your using a VPS please follow the steps below:
      1. Using FileZilla connect to your server (use Port Number 22).
      2. Under the root directory, create a folder named brave.
      3. Transfer the following files and folders into the brave folder. (You can overwrite files but not folders)
        1. main.py
        2. config.yml
        3. utils (folder)
        4. cogs (folder)
        5. components (folder)
        6. assets (folder)
        7. pyproject.toml
        8. .python-version
        9. .env
        10. maindb.sqlite
        11. uv.lock
        12. Dockerfile(required if deploying via docker)
        13. docker-compose.yml (required if deploying via docker)
      4. Now using Putty, access your server's command line (Use Port Number 22and "SSH" as your Connection Type).
      5. Install uv. (REQUIRED)
      6. Deploy your bot using Docker or PM2.
        • If you are deploying via docker do: docker compose up -d
        • If you are deploying via PM2 do:
          1. uv sync
          2. pm2 start "uv run python main.py" --name discord-bot
    2. If you are running the bot from a IDE for testing purposes please do:
      1. uv sync
      2. uv run main.py

Brave Bot Configuration Information:

  • Topia System Configuration (This is also alongside Topia System Overrides):
    1. Pro & None Pro VAT Rates
    2. Pro & None Pro Tax Rates
    3. Multipliers for Pro and None Pro Users
    4. Earning Ranges (Pro & None Pro)
    5. Winning Amount Ranges (Pro & None Pro)
    6. Daily Earning Ranges (Pro & None Pro)
    7. Pro Battle Saving (Pro Only and is used solely as a percent)
    8. Tax Refund Range
    9. Government Benefit Range
    10. Stocks (Gain or Lose) Range (Apart of a Pro Only Feature unless the Pro System is disabled)
    11. Bong Game Per Round Coin Range
    12. Farm Revenue Range (Apart of a Pro Only Feature unless the Pro System is disabled)
    13. Division Number for Profile Level
    14. Topia Adversaries
  • You can also set the following fields:
    1. Support Server Rules.
      • /help's Extra: "Rules" allows the Bot Owner to send a embed of their Rules. You need to have given a Channel ID for the Rules Channel ID field for this to work.
    2. Donate URl.
      • Give a Donate/Pay link to allow users to donate/support your bot's development.
    3. Open Positions.
      • With YAML multi-string, list the positions that you are looking for. This field requires the Application Override to be enabled (set to True).
    4. Disallow /nuke in certain servers.
      1. Set the Nuke Command Restrictions Override to True (enabled).
      2. Add the servers (server-ids), that you do not want /nuke to work in, into the No Nuke Command Servers list field.
    5. Scenic Loading Images
      • For Bot Statistics help-extra and /help, you will first get a loading embed. If you enable the Scenic Loading Image System Override and added image addresses to the Scenic Loading Images list field, images will then appear for the end-user.
    6. Banned Nicknames
      • Enable the Banned Nicknames Override and have nicknames in the Banned Nicknames field. Once done, when using /nickname nicknames listed in the field will not be allowed.

Note

You do not need to update the version field when first starting out.

Failure

Your Discord App/Bot will not boot/run if your configuration is done incorrectly. If you require assistance please open a ticket in our support server. (Linked in the footer)

Example env Files:

Example .env File with just a Bot Token:

Token = # Insert your Bot Token here

Warning

If you intend on enabling Sentry Error Tracking, please look at the example below instead.

Note

If the Production Mode Override is disabled (set to False) the the code will load the .env file and will look for Testing Token instead.

Example .env File with a DSN, Testing Token and a Bot Token:

Token = # Your Bot's/App's Token Here.
DSN = # Your Project's DSN Here.
Testing_Token = # Your Testing Bot's/App's Token Here.

Website Fork Guide:

Once you have downloaded/cloned our monorepo and ensured you have installed uv. Please follow the steps below on how to fork & deploy our website.

Info

If you wish to use our Docs to inform your Users how your bot works. Then you are more than welcome to. Please follow our Issue Creation Guide.

Danger

Do not delete the following files:

  1. The Configuration File. mkdocs.yml
  2. The Homepage File. index.md
  3. The License file. LICENSE.md
  4. The GitLab CI/CD Yaml File. .gitlab-ci.yml (Only needed if you are using GitLab CI/CD for deployment)

Tip

  1. Heavy modification is needed if you wish to remove all "signs" that IndiSpark wrote it or etc. Please note though that under GPL 3.0 license you are required to credit the respective authors.
  2. You can also remove certain areas of the website. Please note that you will need to update your mkdocs.yml upon such changes.

Website Deployment for Testing:

Run the following command in your IDE's Terminal:

uv run --only-group docs mkdocs serve

Website Public Deployment:

  1. Update your mkdocs.yml:
    1. Remove/comment out the docs_dir line.
    2. Update your custom_dir line to: overrides.
  2. Using FileZilla connect to your server (use Port Number 22).
  3. Inside your root directory transfer the website folder.
  4. Inside your website folder, transfer the following files:
    1. mkdocs.yml
    2. uv.lock
    3. pyproject.yml
  5. Using Putty access your server's command line (Use Port Number 22and "SSH" as your Connection Type).
  6. Install uv on your server.
  7. Install & deploy: uv run --only-group docs mkdocs build
uv run --only-group docs mkdocs build # This will build and deploy a mainline version of your website.

Website Deployment Guide GitLab CI/CD:

Note

The GitLab CI/CD file also contains a stage for checking Brave Bot's code. You only need the docsupdate stage.

Warning

The docsupdate stage is setup work with Pipeline Schedules. Click Here to Learn More

No modifications required unless you want your docs to update upon every commit. Click Here

Archived Projects:

Warning

Both Thread Bot and Ultimate Ban Bot use a library (Nextcord) that we no longer use. The library has also released breaking changes.

Thread Bot:

Warning

Thread Bot uses logic that we do not recommend using.

  1. Download the thread bot folder as a zip folder from the Community Archive Folder.
  2. Unzip it.
  3. Modify the code for your uses and etc.
  4. Deploy it.

Ultimate Ban Bot:

Ultimate Ban Bot (UBB) is an old bot that was made by us. It is now open source and available for anyone to use. It is only available via the monorepo and is therefore license under this website's license (GPL 3.0).

  1. Download the ubb.py file from the Community Archive Folder.
  2. Modify the code for your uses and etc.
  3. Deploy it.