Metadata-Version: 2.4
Name: yapper.py
Version: 1.0.0
Summary: An unofficial Python Library for Yapper
Author-email: LeAndre C <leandre@lecanact.me>
License-Expression: GPL-3.0-only
Project-URL: Repository, https://github.com/our-websites/yapper.py
Project-URL: Issues, https://github.com/our-websites/yapper.py/issues
Project-URL: Documentation, https://yapper.website/developers
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: python-dotenv>=1.2.4
Dynamic: license-file

# yapper.py

Unofficial Python library for building bots on [Yapper](https://www.yapper.website/developers).

## Install

```bash
pip install yapper.py
```

## Quick start

```python
import yapper

bot = yapper.Bot()  # reads YAPPER_BOT_TOKEN from env

@bot.command("ping", "Check if the bot is alive")
def ping(msg):
    msg.reply("pong")

@bot.on("member_join")
def welcome(ev):
    print(f"{ev.username} joined")

@bot.button("vote:")
def vote(i):
    i.ephemeral("You picked " + i.custom_id[5:])

bot.run()
```

Set `YAPPER_BOT_TOKEN` in your environment (token starts with `yb_`).

## Main concepts

- **Commands**: register slash/prefix commands with `@bot.command(...)`.
- **Events**: listen with `@bot.on("event_name")` or `@bot.event`.
- **Interactions**: handle button clicks with `@bot.button("prefix:")`.
- **Components**: build rows/buttons with `yapper.row(...)`, `yapper.btn(...)`, and `yapper.link_button(...)`.
- **Cogs/extensions**: split features into classes/files using `yapper.Cog`, `bot.add_cog(...)`, `bot.load_extension(...)`, and `bot.load_extensions(...)`.

## Useful bot methods

- Messaging: `send`, `edit`, `delete`, `react`
- Interactions: `respond`
- Server data: `servers`, `server`, `channels`, `members`, `roles`, `user`
- Moderation: `add_role`, `remove_role`, `kick`, `ban`, `unban`, `timeout`
- Presence/profile: `set_status`, `set_profile`

## API reference

Use the official Yapper developer docs for API payload details:
https://www.yapper.website/developers
