diff --git a/README.md b/README.md index d4da017..6581eba 100644 --- a/README.md +++ b/README.md @@ -1,59 +1,71 @@ -# pi-Bot +# SirrDice -pi-Bot is a Discord bot that manages dice rolls with many customization options. Built on [Py-Cord](https://docs.pycord.dev/), it supports multiple languages and offers several commands to make life easier for both players and game masters. +A Discord bot for rolling dice in tabletop RPG games. -## Main Features +## What is SirrDice? -- **Flexible dice rolling**: expressions like `2d6+3` with modifiers and an optional target name. -- **Custom colors**: each user can choose the bot's message color (`!setcolor red`). -- **Configurable prefix**: adjust the command prefix per server (`!setprefix ?`). -- **Default roll**: define a default roll used when no expression is provided (`!defaultRoll 1d20`). -- **Multilanguage support**: English, French, German and Spanish via `!setlang`. -- **Automatic saving**: preferences and statistics stored in JSON files and cached in memory. +SirrDice is a Discord bot that helps you roll dice for your tabletop games. It supports multiple languages and lets you customize how it looks and works. -## Installation +## Features -1. Clone this repository. -2. Install the dependencies: - ```bash - pip install -r requirements.txt - ``` -3. Create a `config.json` file with the following content: - ```json - { - "token": "YOUR_DISCORD_TOKEN", - "prefix": "!" - } - ``` -4. Start the bot: - ```bash - python main.py - ``` +- **Roll dice easily**: Type `!roll 2d6+3` to roll 2 six-sided dice and add 3 +- **Personalize your colors**: Choose your favorite color for the bot's messages +- **Multiple languages**: Works in English, French, German, and Spanish +- **Custom prefix**: Change the command prefix for your server +- **Default rolls**: Set a default dice roll for quick use +- **Statistics**: Keep track of how many times you've rolled -## Quick Guide +## How to Use -### For players and GMs +### Rolling Dice -- **Roll a single die**: `!roll 1d20` -- **Add modifiers**: `!roll 1d20+5` or `!r 1d6+1d4-2` -- **Shortcut**: `!r` is the same as `!roll` -- **Default roll**: if a roll is set via `!defaultRoll`, calling `!r` with no arguments uses it -- **Change message color**: `!setcolor red` -- **View the current color**: `!getcolor` +The basic command is `!roll` (or just `!r` for short): -### For moderators +``` +!roll 2d6+3 Roll 2 six-sided dice and add 3 +!roll 1d20+5 Goblin Roll against a target named "Goblin" +!r 2d8-2 Quick roll shortcut +!r Use the default roll (if set) +``` -- **Change the language**: `!setlang fr` -- **Set a default roll**: `!defaultRoll 1d20+5` -- **Modify the prefix**: `!setprefix ?` +Supported formats: +- `2d6` - Roll 2 six-sided dice +- `1d20+5` - Roll 1 twenty-sided die and add 5 +- `3d8-2` - Roll 3 eight-sided dice and subtract 2 +- `2d6+1d4+3` - Mix different dice and modifiers -Only those with the "Manage Server" permission can change the language, default roll, or prefix. +### Personalizing Colors -## Additional Notes +Choose your favorite color for the bot's messages: -- The files `user_stats.json`, `user_preferences.json` and `server_preferences.json` are generated automatically and ignored by git. -- Audit logs are saved in `audit.log`. +``` +!setcolor blue Choose blue (options: blue, red, green, yellow) +!getcolor See your current color +``` + +### Server Settings (For Moderators) + +These commands require "Manage Server" permission: + +``` +!setlang en Change language (en, fr, de, es) +!defaultRoll 1d20 Set a default roll for quick use +!setprefix ? Change the command prefix +``` ## Contributing -Contributions are welcome! Feel free to open an issue or pull request to suggest improvements. +This project is personal, but contributions are welcome. Feel free to: +- Suggest improvements +- Report bugs +- Add new features + +To contribute: +1. Fork the project +2. Create a branch +3. Make your changes +4. Submit a Pull Request + +## Contact + +For questions or suggestions: **core.layer**