Metadata-Version: 2.4
Name: omnivybe.py
Version: 2026.10.20.1.2
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.
- ⚡ **Slash Commands & Interactions API**: Complete Application Commands support! Register modern slash commands via `@bot.slash_command(name="...", description="...")`, synchronize commands globally or per-guild using `await bot.sync_commands(guild_id=...)`, and respond with `interaction.response.send_message(..., ephemeral=True)`, deferred replies, follow-ups, and typed options (`interaction.options.get(...)`).
- 🛠️ **`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`, `Guild`, `Interaction`, and `ChatInputCommandInteraction`.
- 🛡️ **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. Modern Slash Commands & Interactions

Create slash commands that immediately show up in OmniVybe Web, Desktop, and Mobile clients when users type `/`:

```python
import os
from omnivybe import GatewayIntentBits
from omnivybe.ext import commands

bot = commands.Bot(
    command_prefix="!",
    intents=GatewayIntentBits.Guilds | GatewayIntentBits.GuildMessages
)

# Register a slash command with description
@bot.slash_command(name="ping", description="Check bot latency and operational status")
async def ping(interaction):
    # Respond with an ephemeral message visible ONLY to the caller
    await interaction.response.send_message("🏓 Pong! OmniVybe Python Slash Command is operational.", ephemeral=True)

@bot.slash_command(name="info", description="Get current server and user information")
async def info(interaction):
    user = interaction.user
    await interaction.response.send_message(f"👤 Commanded by: **{user.tag}** (ID: `{user.id}`)")

@bot.event
async def on_ready():
    print(f"🚀 OmniVybe bot is online as {bot.user.tag} (ID: {bot.user.id})")
    # Synchronize slash commands globally (or pass guild_id="GUILD_ID" for instant guild testing)
    await bot.sync_commands()
    print("✅ Slash commands successfully registered and synchronized with OmniVybe!")

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

---

### 2. Advanced Bot with Traditional 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)
```

---

### 3. 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
```

---

### 4. 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

```text
MIT License

Copyright (c) 2026 OmniVybe Team

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
