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:
Git Clone Links:
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:
- Apply the following file changes:
- Create a DB file named
maindb.sqlite. - Rename
example.ymltoconfig.yml. - Create an
.envfile and follow our Token Storage Guide. Click Here
- Create a DB file named
- You now need to setup and configure your
config.yml.- The following ID Fields are required:
Server IDOwner ID- There is also other optional ID Fields. Either set them to
Falseor leave them empty. Do NOT delete them.Logs Channel IDRules Channel IDMain Source Code Project ID
- You can also add Co Bot Owners via the
Co Bot Ownerslist field (add the IDs).
- You also must set the
Policy URL,Bot NameandSupport Server Invite URLfields in yourconfig.yml.- We by default send users to our Docs (this website). To change this you must update the codebase.
- 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.envto have your Sentry DSN. Example.envwith DSN and Bot Token - If you plan on enabling the
Topia Override. Please ensure you enable theSetup Database Boot Mode Overridefor 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.
- The Fork Override should be kept as
- Emoji IDs.
- All of the Emoji fields are pre-filled with emoji IDs from the IndiSpark Server. All emoji fields are required.
- Add Custom Tips.
- In the
Custom Tipslist field, you can add custom tips that you wanna add alongside the baseline tips that are written intips.py(In the utils Folder).
- In the
- The following ID Fields are required:
- Deploy your bot.
- If your using a VPS please follow the steps below:
- Using FileZilla connect to your server (use Port Number
22). - Under the root directory, create a folder named
brave. - Transfer the following files and folders into the
bravefolder. (You can overwrite files but not folders)main.pyconfig.ymlutils(folder)cogs(folder)components(folder)assets(folder)pyproject.toml.python-version.envmaindb.sqliteuv.lockDockerfile(required if deploying via docker)docker-compose.yml(required if deploying via docker)
- Now using Putty, access your server's command line (Use Port Number
22and "SSH" as your Connection Type). - Install uv. (REQUIRED)
- 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:
uv syncpm2 start "uv run python main.py" --name discord-bot
- If you are deploying via docker do:
- Using FileZilla connect to your server (use Port Number
- If you are running the bot from a IDE for testing purposes please do:
uv syncuv run main.py
- If your using a VPS please follow the steps below:
Brave Bot Configuration Information:
- Topia System Configuration (This is also alongside Topia System Overrides):
- Pro & None Pro VAT Rates
- Pro & None Pro Tax Rates
- Multipliers for Pro and None Pro Users
- Earning Ranges (Pro & None Pro)
- Winning Amount Ranges (Pro & None Pro)
- Daily Earning Ranges (Pro & None Pro)
- Pro Battle Saving (Pro Only and is used solely as a percent)
- Tax Refund Range
- Government Benefit Range
- Stocks (Gain or Lose) Range (Apart of a Pro Only Feature unless the Pro System is disabled)
- Bong Game Per Round Coin Range
- Farm Revenue Range (Apart of a Pro Only Feature unless the Pro System is disabled)
- Division Number for Profile Level
- Topia Adversaries
- You can also set the following fields:
- 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 theRules Channel IDfield for this to work.
- Donate URl.
- Give a Donate/Pay link to allow users to donate/support your bot's development.
- Open Positions.
- With YAML multi-string, list the positions that you are looking for. This field requires the
Application Overrideto be enabled (set toTrue).
- With YAML multi-string, list the positions that you are looking for. This field requires the
- Disallow
/nukein certain servers.- Set the
Nuke Command Restrictions OverridetoTrue(enabled). - Add the servers (server-ids), that you do not want
/nuketo work in, into theNo Nuke Command Serverslist field.
- Set the
- Scenic Loading Images
- For
Bot Statisticshelp-extra and/help, you will first get a loading embed. If you enable theScenic Loading Image System Overrideand added image addresses to theScenic Loading Imageslist field, images will then appear for the end-user.
- For
- Banned Nicknames
- Enable the
Banned Nicknames Overrideand have nicknames in theBanned Nicknamesfield. Once done, when using/nicknamenicknames listed in the field will not be allowed.
- Enable the
- Support Server Rules.
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:
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:
- The Configuration File.
mkdocs.yml - The Homepage File.
index.md - The License file.
LICENSE.md - The GitLab CI/CD Yaml File.
.gitlab-ci.yml(Only needed if you are using GitLab CI/CD for deployment)
Tip
- 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.
- You can also remove certain areas of the website. Please note that you will need to update your
mkdocs.ymlupon such changes.
Website Deployment for Testing:
Run the following command in your IDE's Terminal:
Website Public Deployment:
- Update your
mkdocs.yml:- Remove/comment out the
docs_dirline. - Update your
custom_dirline to:overrides.
- Remove/comment out the
- Using FileZilla connect to your server (use Port Number
22). - Inside your root directory transfer the website folder.
- Inside your website folder, transfer the following files:
mkdocs.ymluv.lockpyproject.yml
- Using Putty access your server's command line (Use Port Number
22and "SSH" as your Connection Type). - Install uv on your server.
- 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.
- Download the
thread botfolder as a zip folder from the Community Archive Folder. - Unzip it.
- Modify the code for your uses and etc.
- 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).
- Download the
ubb.pyfile from the Community Archive Folder. - Modify the code for your uses and etc.
- Deploy it.