Metadata-Version: 2.4
Name: omnivybe.py
Version: 2026.10.20.1.1
Summary: The official, fully-featured, and high-performance Python bot SDK for the OmniVybe platform.
Author: OmniVybe Team
License: MIT
Project-URL: Homepage, https://omnivybe.com.tr
Keywords: omnivybe,omni,omnivybe.py,bot,sdk,gateway,rest,chat
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp>=3.9.0
Dynamic: license-file

# omnivybe.py

> The official, fully-featured, and high-performance Python bot SDK for the **OmniVybe** platform (1:1 feature parity with `omnivybe.js` + Next-Gen Python Extensions).

[![Python Version](https://img.shields.io/badge/python-3.9+-blue.svg?style=flat-square)](https://www.python.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)

---

## 🚀 Installation

```bash
pip install omnivybe.py
```

---

## ⚡ Features & Capabilities

- 🎯 **Full Bot & Gateway Lifecycle**: Built-in automatic heartbeats, seamless reconnects, resume flows, and session state tracking.
- 🛠️ **`omnivybe.ext.commands`**: Prefix-based command framework, dynamic prefix resolvers, multi-alias handling, and an intuitive `Context` API (`ctx.reply`, `ctx.send`).
- 🧩 **Hot-Reloadable Cogs & Extensions**: Modularize bot features into cogs and reload code in real time without downtime via `bot.load_extension()` and `bot.reload_extension()`.
- ⏱️ **Background Tasks (`omnivybe.ext.tasks`)**: Effortless asynchronous task scheduling with `@tasks.loop(seconds=..., minutes=...)`.
- 📖 **Interactive Paginator (`omnivybe.ext.paginator`)**: Built-in reaction-based multi-page embed navigator with interactive buttons (◀️ ▶️ ⏹️).
- 🚦 **Intelligent Rate Limiter (`RateLimiter`)**: Asynchronous token-bucket algorithm preventing HTTP 429 (Too Many Requests) throttling during high-load operations.
- 💎 **Rich Builders**: Fluent, chained builders including `EmbedBuilder`, `AttachmentBuilder`, and `MessagePayload`.
- 🔍 **Collectors**: Interactive `MessageCollector` and `ReactionCollector` for conversational workflows.
- 📂 **Full Object Models**: `User`, `GuildMember`, `Role`, `Message`, `TextChannel`, `VoiceChannel`, `CategoryChannel`, `ThreadChannel`, and `Guild`.
- 🛡️ **Bitfields & Permissions**: `PermissionsBitField`, `PermissionFlags`, `MessageFlagsBitField`, `UserFlagsBitField`, and `GatewayIntentBits`.
- 🌐 **CDN Helpers**: First-class URL builders for `cdn_avatar_url`, `cdn_display_avatar_url`, `cdn_banner_url`, `cdn_emoji_url`, `cdn_sticker_url`, and `cdn_guild_asset_url`.
- 🎨 **Emoji & Markdown Utilities**: `parse_emoji`, `format_emoji`, `get_unicode_from_shortcode`, `escape_markdown`, `format_timestamp`, and `resolve_color`.
- 💻 **Scaffolding CLI**: Generate a complete, production-ready bot template in seconds with `python -m omnivybe init`.

---

## 📖 Quick Start

### 1. Advanced Bot with Commands & Interactive Paginator

```python
import os
from omnivybe import GatewayIntentBits, EmbedBuilder
from omnivybe.ext import commands, tasks
from omnivybe.ext.paginator import Paginator

# Initialize bot client with intents and command prefix
bot = commands.Bot(
    command_prefix="!",
    intents=GatewayIntentBits.Guilds | GatewayIntentBits.GuildMessages | GatewayIntentBits.MessageContent
)

@bot.event
async def on_ready():
    print(f"🚀 OmniVybe bot is online as {bot.user.tag} (ID: {bot.user.id})")
    status_updater.start()

@bot.command(name="ping", description="Check bot latency and status")
async def ping(ctx):
    await ctx.reply("🏓 Pong! OmniVybe Python Framework is operational.")

@bot.command(name="help_menu", description="Interactive multi-page help embed")
async def help_menu(ctx):
    page1 = (
        EmbedBuilder()
        .set_title("OmniVybe Help - Page 1")
        .set_description("Welcome to the bot help menu!\nUse the reaction arrows below to browse.")
        .set_color(0x5865F2)
    )
    page2 = (
        EmbedBuilder()
        .set_title("OmniVybe Help - Page 2")
        .set_description("🛡️ **Moderation Commands**\n• `!kick` - Kick a user\n• `!ban` - Ban a user")
        .set_color(0x57F287)
    )

    paginator = Paginator([page1, page2], timeout=45.0)
    await paginator.start(ctx)

# Background loop running every 60 seconds
@tasks.loop(seconds=60)
async def status_updater():
    print("⏰ [Background Task] Performing periodic status check...")

if __name__ == "__main__":
    token = os.environ.get("OMNIVYBE_BOT_TOKEN", "YOUR_BOT_TOKEN_HERE")
    bot.run(token)
```

---

### 2. Scaffold a New Bot Project via CLI

Quickly bootstrap a complete bot workspace containing `.env`, `bot.py`, and a `cogs/` directory:

```bash
python -m omnivybe init my_bot
cd my_bot
python bot.py
```

---

### 3. Utility & CDN Helpers

```python
from omnivybe import (
    parse_emoji,
    format_emoji,
    get_unicode_from_shortcode,
    escape_markdown,
    format_timestamp,
    cdn_emoji_url,
)

# Shortcode to Unicode
flag = get_unicode_from_shortcode("flag_tr")  # '🇹🇷'

# Emoji Parsing & Formatting
parsed = parse_emoji("<a:blob_party:123456789012345678>")
formatted = format_emoji("blob_party", id=123456789012345678, animated=True)

# Safe Markdown Escaping
clean_text = escape_markdown("**bold** and ||spoiler||")

# Discord / OmniVybe Dynamic Timestamp
relative_time = format_timestamp(1700000000, style="R")  # <t:1700000000:R>
```

---

## 📄 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
