1
Fork 0
mirror of https://github.com/allthingslinux/tux.git synced 2024-10-02 16:43:12 +00:00
Tux is an all in one bot for the All Things Linux discord server.
Find a file
wlinator c310e8aaa6 refactor: Update Docker Compose configuration and Dev cog
- Update Docker Compose configuration to use bind mount for volume
- Update Dev cog to use the correct import for the Tux bot class
- Add a new 'stop' command to the Dev cog to stop the bot
2024-09-02 10:24:07 -04:00
.archive refactor: remove dollar sign from usage instructions in various commands for consistency 2024-08-15 06:33:00 +00:00
.github refactor(reactionmenu): move stubs to new typings dir 2024-08-31 13:39:57 -04:00
assets Merge pull request #457 from exvh/main 2024-08-25 10:41:28 -05:00
config feat: add example settings.yml file to provide a template for configuration settings 2024-08-22 01:44:37 +00:00
docs chore: move docs/resources to assets/branding 2024-08-21 21:55:44 -04:00
prisma refactor(schema.prisma, case.py, note.py): rename 'target' to 'user' for better clarity 2024-08-27 10:31:49 +00:00
tux refactor: Update Docker Compose configuration and Dev cog 2024-09-02 10:24:07 -04:00
typings/reactionmenu refactor(reactionmenu): move stubs to new typings dir 2024-08-31 13:39:57 -04:00
.editorconfig feat: add .editorconfig for consistent coding style across different editors 2024-04-11 20:22:47 +00:00
.env.example refactor(.env.example): restructure and categorize environment variables for better readability and understanding 2024-08-25 06:15:22 +00:00
.gitignore chore: switch from JSON to YAML for configuration file 2024-08-22 01:44:00 +00:00
.markdownlint.yaml docs(CODE_OF_CONDUCT.md, CONTRIBUTING.md): wrap email and URLs in angle brackets for better markdown rendering 2024-08-17 08:27:13 +00:00
.mise.toml feat: add .editorconfig for consistent coding style across different editors 2024-04-11 20:22:47 +00:00
.pre-commit-config.yaml chore(.pre-commit-config.yaml): comment out pyright-python hook due to compatibility issues 2024-08-31 17:44:28 +00:00
docker-compose.yml refactor: Update Docker Compose configuration and Dev cog 2024-09-02 10:24:07 -04:00
Dockerfile Alphabetise RUN instructions 2024-08-11 19:14:20 +01:00
justfile feat(docs): add MkDocs documentation with initial pages 2024-07-31 01:38:07 +00:00
LICENSE.md Update LICENSE.md 2024-06-21 23:54:58 -04:00
mkdocs.yml feat(docs): add MkDocs documentation with initial pages 2024-07-31 01:38:07 +00:00
poetry.lock Merge pull request #496 from allthingslinux/renovate/aioconsole-0.x 2024-08-31 14:08:19 -04:00
poetry.toml feat(poetry.toml): add poetry.toml file to create virtual environments within the project directory 2024-07-02 19:19:07 +00:00
pyproject.toml fix(deps): update dependency aioconsole to ^0.8.0 2024-08-31 17:48:56 +00:00
README.md docs(contributor): contrib-readme-action has updated readme 2024-08-31 18:08:21 +00:00
renovate.json Add renovate.json 2024-04-11 20:02:04 +00:00

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 suggest against using it until announced. Join our support server: atl.dev for more info!

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
  • Request handling with HTTPX

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.yml.example file to config/settings.yml and fill in the required values.

    cp config/settings.yml.example config/settings.yml
    

    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

Contributors

0x4248
0x4248
wlinator
wlinator
kzndotsh
kzndotsh
electron271
electron271
scottc943
scottc943
FluxC0
FluxC0
Atmois
Atmois
ExploitDemon
ExploitDemon
jwe66
jwe66
targzballs
targzballs
doomed-neko
doomed-neko
HikariNeee
HikariNeee
AuraPy
AuraPy
clonidine
clonidine
exhq
exhq
CapnRyna
CapnRyna
exvh
exvh
Izder456
Izder456
lilyyllyyllyly
lilyyllyyllyly
Ow0cast
Ow0cast
userbyte
userbyte
soupyfx
soupyfx
Bikoil
Bikoil
thecaprisun
thecaprisun
teilorr
teilorr