Metadata-Version: 2.4
Name: fortroyal2d
Version: 1.6.5
Summary: Build FortRoyal 2D group chat bots in Python (kick, ban, roles, messages, channels).
Author: FortRoyal 2D
License-Expression: MIT
Keywords: fortroyal,fortroyal2d,bot,game,chat
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# fortroyal2d

Build bots for FortRoyal 2D group chats in Python. No dependencies.

```
pip install fortroyal2d
```

```python
import fortroyal2d

bot = fortroyal2d.Bot("frbot_YOUR_TOKEN")   # Group Bot Token, shown once inside FortRoyal Bot Maker

@bot.on_join
def welcome(ctx):
    ctx.reply(f"Welcome to {ctx.group}, {ctx.user}!")

@bot.command("banish", min_role="admin")     # !ban is reserved by the game
def banish(ctx):
    ctx.ban(ctx.args[0], " ".join(ctx.args[1:]) or "No reason")

bot.run()
```

Your Group Bot Token is shown once in the **FortRoyal Bot Maker** tab after you press Create Bot (or New Token).
Copy it there and paste it into `fortroyal2d.Bot(...)`.

Events: `on_message`, `on_join`, `on_leave`, `on_added`, `on_removed`, `on_ready`, `on_error`, `@bot.command(...)`.
Actions: `reply`, `kick`, `ban`, `unban`, `give_role`, `remove_role`, `create_role`, `delete_role`,
`delete_message`, `create_channel`, `rename_channel`, `members`, `channels`, `roles`.
Moderation actions need the matching permission, which a group's Owner/Admin ticks when inviting the bot.
Bots can never act on a group's owner or admins.
