Metadata-Version: 2.4
Name: rubydc
Version: 0.1.2
Summary: A small Discord bot framework built on discord.py
Keywords: discord,discord.py,discord bot,bot
Author: NotHMRC
Author-email: NotHMRC <dcreator112@proton.me>
License-Expression: MIT
License-File: LICENCE
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: AsyncIO
Classifier: Intended Audience :: Developers
Classifier: Topic :: Communications :: Chat
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Communications :: Chat
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Programming Language :: Python :: 3.16
Requires-Dist: aiohttp>=3.14.3
Requires-Dist: discord-py>=2.7.1
Requires-Dist: pydantic>=2.13.5
Requires-Dist: pymongo>=4.17.0
Requires-Dist: python-dotenv>=1.2.2
Requires-Dist: ruamel-yaml>=0.19.1
Requires-Dist: rich>=15.0.0
Requires-Dist: typer>=0.29.1
Requires-Dist: uv>=0.13.8
Requires-Dist: questionary>=2.1.1
Requires-Python: >=3.14
Project-URL: Homepage, https://ruby.toaster.quest
Project-URL: Documentation, https://ruby.toaster.quest
Project-URL: Repository, https://codeberg.org/NotHMRC/Ruby
Project-URL: Issues, https://codeberg.org/NotHMRC/Ruby/issues
Project-URL: Changelog, https://codeberg.org/NotHMRC/Ruby/src/branch/main/CHANGELOG.md
Description-Content-Type: text/markdown

# Ruby

A small framework on top of [discord.py](https://github.com/Rapptz/discord.py) for single-server Discord bots.
You write the cogs, and Ruby handles the config, database, error messages, logging and more.

Docs: https://ruby.toaster.quest

## Features

- **Drop-in cogs**: put a `.py` file in `cogs/` and it loads at startup. A cog that fails to load is logged and skipped, not fatal.
- **One YAML file**: name, prefix, owners, statuses, channels and per-cog settings live in `config.yaml`, validated with pydantic.
- **Rewordable messages**: every message comes from a string table, so a server can reword any of them in its config.
- **Friendly errors**: cooldowns, missing permissions, bad arguments and crashes get a sensible reply, for prefix and slash commands.
- **MongoDB built in**: an async PyMongo database named after your bot is ready as `bot.db`.
- **Logs where you look**: a rotating `bot.log`, plus coloured embeds in a log channel on your server.

## Requirements

- Python 3.14 or newer
- [uv](https://docs.astral.sh/uv/)
- A MongoDB server (recommended; some cogs assume it)
- A bot application from the Discord Developer Portal, with the **Message Content** and **Server Members** intents enabled

## Quick start

```sh
uvx rubydc init ruby-bot
cd ruby-bot
uv run ruby
```

`rubydc init` creates the project (a `cogs/` folder, `.env` and `config.yaml`) and asks for your bot token and settings as it goes.

Run Ruby from inside the project folder: it reads `config.yaml`, `.env` and `cogs/` from the current directory.

```
ruby-bot/
├── pyproject.toml
├── .env          # secrets: token and database
├── config.yaml   # everything else
└── cogs/         # your features, one file each
```

Never commit `.env`.

## Documentation

Getting started, configuration, errors and deploying are covered at https://ruby.toaster.quest.

## License

See the `LICENCE` file.
