67 lines
1007 B
Markdown
67 lines
1007 B
Markdown
# Mafia Game Bot for XMPP
|
|
|
|
A Mafia (Werewolf) social deduction game bot for XMPP chat rooms.
|
|
|
|
## Requirements
|
|
|
|
- Python 3.8+
|
|
- XMPP account for the bot
|
|
|
|
## Installation
|
|
|
|
### 1. Clone and enter directory
|
|
|
|
```bash
|
|
git clone https://codeberg.org/xmppkeyboardguy/xmpp-mafia-bot.git
|
|
cd xmpp-mafia-bot
|
|
```
|
|
|
|
### 2. Create virtual environment
|
|
|
|
```bash
|
|
python3 -m venv venv
|
|
source venv/bin/activate # Linux/macOS
|
|
# or
|
|
venv\Scripts\activate # Windows
|
|
```
|
|
|
|
### 3. Install dependencies
|
|
|
|
```bash
|
|
pip install slixmpp
|
|
```
|
|
|
|
### 4. Configure
|
|
|
|
Create `config.ini`:
|
|
|
|
```ini
|
|
[XMPP]
|
|
jid = bot@yourserver.com
|
|
password = your_password
|
|
rooms = mafia@conference.yourserver.com
|
|
|
|
[Bot]
|
|
nickname = MafiaBot
|
|
trigger = !mafia
|
|
admin_users = admin@yourserver.com
|
|
```
|
|
|
|
### 5. Run
|
|
|
|
```bash
|
|
python mafia_bot.py
|
|
```
|
|
|
|
## Quick Start
|
|
|
|
In chat room:
|
|
1. `!mafia new` - Create game
|
|
2. `!mafia join` - Players join
|
|
3. `!mafia start` - Begin game
|
|
|
|
Use `!mafia help` for all commands.
|
|
|
|
Or you can ping the bot with its name like "MafiaBot: new"
|
|
|