Skip to content

Development Guide for IndiSpark's Monorepo @ Development Guide:

Welcome to IndiSpark's Development 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 have uv installed.

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

Brave Bot Development Guide:

Please follow the guidelines below when modifying anything Brave Bot. Our monorepo's used Python version is outlined in .python-version.

  • When creating a new command please ensure you update data.py.
    • If you are renaming a command please update it's name in it's respective unit's commands list.
  • Add comments explaining any confusing/complex logic.
  • When creating a slash command it must start like: @discord.slash_command() (Please ensure you fill out the name and description arguments)
    • ApplicationContext is always alised as ctx.
  • Any error messages should be like the one displayed below: ({no} is the cross emoji. Which must be imported from assets.data)
await ctx.respond(f"> {no} Creation of Issue Failed", ephemeral=True)
  • All Errors must also be captured via Brave Bot's Sentry Integration. To do this import the function named: sentry_capture_error() from utils.integrations. Only the Error argument is required.
    1. The User ID. Not required if no User ID can be given.
    2. The Error.(Giving the execption is preferred, else write the error/limitation the user has ran into. Common Errors have Error Messages that you must use)
      1. No Topia Profile Error: No Topia Profile Found
      2. Override Disabled (System Disabled): {Name of Override} Disabled
        • Example: Topia Override Disabled
      3. Trying to take action aganist Bots/Apps: Can not {Action} Bots/Apps
        • Example: Can not Ban Bots/Apps
      4. Trying to take action aganist a user higher or equal to you: Can not {Action} Users higher than you or equal to you
        • Example: Can not Ban Users higher than you or equal to you
      5. Trying to take action aganist yourself: Can not {Action} Yourself
        • Example: Can not Ban Yourself
      6. Insufficient Coin Balance: Insufficient Coins in User's Balance
      7. Not in required type of Channel. User not in a {Type of Channel}
        • Example: User not in a VC
  • Use Emojis where deemed nesccary.
    • When something finishes / completes you send a ephemeral message like the error one but instead of the {no} use {yes}.
    • Unit Emojis can be used where you deem needed.
  • Please use the functions made in the utils directory. This is so the codebase is simplified and and easier to read. (Nearly all overrides have a "check" function somewhere in the utils directory. You must use it)
    • Common API Functions. Including:
      • Sentry.io Integration Functions.
      • GitLab Integration Functions.
    • Common Maths Functions.
    • Common Embed Functions.
      1. GlobaLog Embed Generator
      2. Brave Bot Pro Acqusition Embed Generator
    • Common Database Functions.
    • Common Pro Functions.
      1. For Pro User Check use the function called pro_user_check().
      2. To check if the Pro System is enabled use the function called pro_override_check()
        • To check weather a specific part of the Pro System is enabled use the correct function.
          1. For User use: pro_user_type_override_check()
          2. For Server use: pro_server_type_override_check()
    • Common Topia Functions.
      • Please use the topia override function named topia_override_check()
      • Please also use the Profile suspension check function named: profile_suspension_check()
    • YAML Config Functions.
    • Override(s) Functions.

Website Development Guide:

  1. Images should be stored in the Images folder named assets. Only .png / .svg images are allowed.
  2. When updating the layout of the website (adding, removing or renaming a page) please ensure you update the mkdocs.yml
    • Look at exisiting configuration if stuck.
  3. We currently are not working on different languages of the website. If you wish to start please create an issue.
  4. Guide Specific titles:
    • For Brave Bot do: # {title} @ Brave Bot: on the first line.
    • For the Linux Guide do: # {title} @ Linux Guide: on the first line.
    • For the Coding Guide do # {title} @ Coding Guide: on the first line.
    • For the Development & Contributor Guide do # {title} @ Development Guide: on the first line.
  5. When doing command scripts please ensure you put it in code-bloc and use shell/bash.
  6. If possible please code examples to the Community Examples folder located in the community folder.
  7. When writing a new blog post please ensure you have the following at the top:
    1. Title
    2. Date
    3. Authors
    4. Slug
    5. Description
    6. Pin
    7. Categories
---
title: Blog Post
date: 2024-11-01 # Publication Date
authors: [J3ZZA]
slug: blog
description: Test / Example
pin: false
categories:
  - General 
  - Miscellaneous
---

Blog Assets Guide:

When creating a "Service Update", "Product Update" or a "Roadmap" post, please use the base asset provided in the assets folder.

  1. For a Product Update post use the image named: pu-asset.png
  2. For a Service Update post use the image named: su-asset.png
  3. For a Roadmap post use the image named: roadmap-asset.png

CI/CD:

Please know that every Monday & Friday at 3pm UTC, checks are carried out on the monorepo for styling issues and more. If you have any proposals that could possibly improve the system please create an issue.

UV & Packages:

When updating the pyproject.toml manually please do uv lock aftwards. If you do uv update [package] then you do not need to do the lock command.