Metadata-Version: 2.4
Name: pycodemeet
Version: 1.2.0
Summary: Python SDK for CodeMeet bots
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Dynamic: requires-python

# pycodemeet

کتابخانه Python برای ساخت Botهای CodeMeet با API ساده، Handler محور و قابل توسعه.

## نصب

```bash
pip install pycodemeet
```

## شروع سریع

```python
from pycodemeet import Bot

bot = Bot("TOKEN")

bot.ms_start("Hello 👋")
bot.ms_help("Help")
bot.ms_about("Built with pycodemeet")


@bot.on_message
def messages(message):
    if message.text == "سلام":
        message.reply("سلام 👋")


bot.run()
```

## Filters

می‌توانید Handlerها را بر اساس نوع یا محتوای پیام فیلتر کنید:

```python
from pycodemeet import Bot, Filters

bot = Bot("TOKEN")


@bot.on_message(Filters.private)
def private_message(message):
    message.reply("Private message")


@bot.on_message(Filters.group)
def group_message(message):
    message.reply("Group message")


@bot.on_message(Filters.text_equals("سلام"))
def hello(message):
    message.reply("سلام 👋")


bot.run()
```

## Commands

```python
bot.command("start", "Welcome!")

bot.command("help", "Available commands")

bot.command("about", "Powered by pycodemeet")
```

## Buttons

```python
from pycodemeet import Bot, Button, InlineKeyboard

bot = Bot("TOKEN")

keyboard = (
    InlineKeyboard()
    .row(
        Button("Profile", "profile"),
        Button("Help", "help")
    )
)

bot.send_message(
    chat_id,
    "Choose an option:",
    reply_markup=keyboard
)
```

## Callback Handler

```python
@bot.on_callback
def callback(call):
    if call.data == "profile":
        call.answer("Profile selected")
        call.reply("Your profile")
```

## Message Management

```python
bot.send_message(chat_id, "Hello")

bot.edit_message(
    chat_id,
    message_id,
    "Edited message"
)

bot.delete_message(
    chat_id,
    message_id
)
```

## Chat Actions

```python
bot.typing(chat_id)
```

## Game

pycodemeet همچنین دارای ابزارهای ساده برای ساخت بازی‌های Bot است:

* Game
* Player
* Inventory
* Cooldown
* Quest
* Leaderboard

## API

### Bot

* `Bot()`
* `bot.run()`
* `bot.stop()`

### Messages

* `send_message()`
* `edit_message()`
* `edit_caption()`
* `edit_keyboard()`
* `delete_message()`
* `forward_message()`
* `copy_message()`

### Handlers

* `on_message()`
* `on_callback()`

### Filters

* `Filters.text`
* `Filters.private`
* `Filters.group`
* `Filters.channel`
* `Filters.text_equals()`
* `Filters.command()`

### UI

* `Button`
* `InlineKeyboard`

## Requirements

Python `3.8` یا بالاتر.

## Version

`1.2.0`

