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/indispark.gitlab.io.git

Clone with HTTPS: Click Here

https://gitlab.com/indispark/indispark.gitlab.io.git

Warning

Cloning our repository is not reccomended unless you are a expirenced developer. We also do not garuntee 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
    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). Manual Intervention Required if you wish to use your own.
    3. Configure Overrides. Learn More
      • The Fork Override should be kept as True. This is so the respective creidts 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 Toke
      • If you plan on enabling the Topia Override. Please ensure you enable the Setup Database Boot Mode Override for first boot. This is so your Database is set-up and configured correctly.
      • We do pre-enable and pre-disable certain overrides upon forking.
    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:
    • The Topia System is always pre-configured when you first fork it. But here is what you can change in your config.yml file:
      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 Benfit 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. Divison Number for Profile Level
    • There is also Topia Overrides that you can configure. This is so you can enable or disable certains parts of your Topia System. Learn More
  • 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 linl to allow users to donate/support your bot's development.
    3. Open Positions.
      • In a YAML multistring, list the positions you are looking for. 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.

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 assitance 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

  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)

Info

  • The Homepage is index.md. Please update it where needed.
  • Each section of the Docs is in a seperate folder.
  • Certain sections have their own index pages. Please note not every section has an index page.

Tip

  1. Heavy modification is needed if you wish to remove all "signs" that IndiSpark wrote it or etc. Please note thought that under the license you are required to creidt the respective authors.
  2. You can also remove certains 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. Now use Putty to access your server's command line (Use Port Number 22and "SSH" as your Connection Type).
  6. Install uv.
  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 Pipline Schedules. Click Here to Learn More

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

Archived Projects:

Thread Bot:

Warning

Nextcord has since released new versions which include breaking changes. IndiSpark has also moved away from using the Nextcord Library. It is now using Pycord.

Warning

Thread Bot uses logic that we do not reccomend 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:

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

Warning

Nextcord has since released new versions which include breaking changes. IndiSpark has also moved away from using the Nextcord Library. It is now using Pycord.

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