1
Fork 0
mirror of https://github.com/allthingslinux/tux.git synced 2024-10-03 00:53:12 +00:00
tux/README.md
kzndotsh 8fcebd00be docs(CODE_OF_CONDUCT.md, CONTRIBUTING.md): wrap email and URLs in angle brackets for better markdown rendering
refactor(CONTRIBUTING.md): improve document structure and readability by adding indentation and spacing
style(CONTRIBUTING.md): add newline at end of file to adhere to POSIX standards

feat: add .markdownlint.yaml for consistent markdown formatting

This commit adds a .markdownlint.yaml configuration file to enforce consistent markdown formatting across the project. This will help maintain readability and uniformity in all markdown files.

docs: improve readability and clarity of project documentation

- README.md: Simplify title and subtitle formatting, add warning about bot readiness, clarify installation steps, and improve overall readability.
- cli.md: Improve readability by adding line breaks.
- commands.md: Remove unnecessary line break.
- development.md: Simplify introduction, refer to README for installation instructions, and improve readability.
- permissions.md: Improve readability by adding line breaks and clarifying permission levels.

style(services.md): improve readability by adding a line break between two sentences
docs(services.md): add newline at end of file to adhere to POSIX standards
2024-08-17 08:27:13 +00:00

4.6 KiB

Tux

A Discord bot for the All Things Linux Discord server

Warning

This bot (without plenty of tweaking) is not ready for production use, we recommend against using it until it is more complete.

About

Tux is an all in one Discord bot for the All Things Linux Discord server.

It is designed to provide a variety of features to the server, including moderation, support, utility, and various fun commands.

Tech Stack

  • Python 3.12 alongside the Discord.py library
  • Poetry for dependency management
  • Docker and Docker Compose for development and deployment
  • Strict typing with Pyright and type hints
  • Type safe ORM using Prisma
  • PostgreSQL database with Supabase
  • Linting and formatting via Ruff and Pre-commit
  • Justfile for easy CLI commands
  • Beautiful logging with Loguru
  • Exception handling with Sentry

Bot Features

  • Asynchronous codebase
  • Hybrid command system with both slash commands and traditional commands
  • Cog loading system with hot reloading
  • Branded embeds and messages
  • Robust error handling
  • Activity rotation
  • Custom help command
  • Configuration system
  • Dynamic role-based (access level) permission system

Installation

Prerequisites

Steps to Install

Assuming you have the prerequisites installed, follow these steps to get started with the development of the project:

Further detailed instructions can be found in the development guide.

  1. Clone the repository

    git clone https://github.com/allthingslinux/tux && cd tux
    
  2. Install the project's dependencies

    poetry install
    
  3. Activate the virtual environment

    poetry shell
    
  4. Install the pre-commit hooks

    pre-commit install
    
  5. Generate the prisma client

    prisma generate
    

    Currently, you will need to have a Supabase database set up and the URL set in the DATABASE_URL environment variable.

    In the future, we will provide a way to use a local database. We can provide a dev database on request.

  6. Copy the .env.example file to .env and fill in the required values.

    cp .env.example .env
    

    You'll need to fill in your Discord bot token here, as well as the Sentry DSN if you want to use Sentry for error tracking.

    We offer dev tokens on request in our Discord server.

  7. Copy the config/settings.json.example file to config/settings.json and fill in the required values.

    cp config/settings.json.example config/settings.json
    

    Be sure to add your Discord user ID to the BOT_OWNER key in the settings file.

    You can also add your custom prefix here.

  8. Start the bot!

    poetry run python tux/main.py
    
  9. Run the sync command in the server to sync the slash command tree.

    {prefix}dev sync <server id>
    

Development Notes

Note

Make sure to add your discord ID to the sys admin list if you are testing locally.

Note

Make sure to set the prisma schema database ENV variable to the DEV database URL.

License

This project is licensed under the terms of the The GNU General Public License v3.0.

See LICENSE for details.

Metrics

Alt