Skip to main content

Jubbio Bot API için Python kütüphanesi

Project description

jubbio.py

Jubbio botları geliştirmek için modern, asenkron ve nesne yönelimli bağımsız (unofficial) Python kütüphanesi.

⚠️ DİKKAT: Bu proje topluluk tarafından geliştirilmiştir ve Jubbio geliştiricileri/sahipleri ile hiçbir resmi bağlantısı yoktur. Jubbio API'sini kullanmak için gayri-resmi bir köprü görevi görür.

PyPI Version Python Versions Asyncio License

KurulumÖzelliklerÖrneklerDokümantasyon


Temel Özellikler

  • Tamamen Asenkron: aiohttp ve asyncio altyapısı ile "non-blocking" performans.
  • Tanıdık ve Sezgisel: discord.py benzeri, öğrenmesi kolay dekoratör (@client.event) tabanlı tasarım.
  • Tam Donanımlı: Slash komutları, embedler (zengin kartlar), butonlar (ActionRow) ve fazlası.
  • Dayanıklı Gateway: WebSockets üzerinden kopmalara karşı otomatik yeniden bağlanma ve rate-limit yönetimi.

Kurulum

Paketi kurmanın en kolay yolu PyPI üzerinden pip kullanmaktır:

pip install -U jubbio.py

Hızlı Başlangıç

Basit bir ping-pong botu yazmak sadece birkaç satır sürer:

import jubbio

client = jubbio.Client()

@client.event
async def on_ready():
    print(f'Sisteme giriş yapıldı: {client.user}')

@client.event
async def on_message(message):
    # Kendi mesajlarımızı yoksayalım
    if message.author.bot:
        return

    if message.content == '!ping':
        await message.channel.send('Pong!')

client.run('BOT_TOKEN_BURAYA')

Slash Komutları (Uygulama Komutları)

Kullanıcıların /bilgi yazarak çağırabileceği modern komutlar oluşturabilirsiniz:

@client.event
async def on_ready():
    # Komutu oluşturup sunucuya kaydedelim
    cmd = jubbio.SlashCommand(
        name='profil',
        description='Kullanıcı profilini görüntüler',
    )
    await client.register_command(cmd)

@client.command(name='profil')
async def profil_komutu(interaction):
    embed = jubbio.Embed(
        title=f"{interaction.user.display_name}",
        color=jubbio.Color.purple()
    )
    embed.add_field(name='ID', value=interaction.user.id)
    await interaction.respond(embed=embed)

Butonlar ve Etkileşimler (Components)

Kullanıcıların tıklayabileceği interaktif butonlar gönderebilirsiniz:

@client.event
async def on_message(message):
    if message.content == '!onay':
        embed = jubbio.Embed(description="Şartları kabul ediyor musunuz?", color=jubbio.Color.blue())
        
        row = jubbio.ActionRow(
            jubbio.Button(style=jubbio.ButtonStyle.SUCCESS, label='Evet', custom_id='btn_yes'),
            jubbio.Button(style=jubbio.ButtonStyle.DANGER, label='Hayır', custom_id='btn_no')
        )
        await message.channel.send(embed=embed, components=[row])

@client.component(custom_id='btn_yes')
async def onaylandi(interaction):
    await interaction.respond('Teşekkürler, onaylandı!', ephemeral=True)

API Referansı

Client Ana Metotları

Metot Ne İşe Yarar?
client.run(token) Botu gateway'e bağlar ve çalıştırır.
client.register_command(cmd) Sunucuya veya globale slash komut kaydeder.
client.send_dm(user_id, msg) Belirtilen kullanıcıya özel mesaj atar.

Olaylar (Events)

Olay Açıklama
on_ready Bot hazır olduğunda
on_message(message) Yeni mesaj geldiğinde
on_interaction(interaction) Etkileşim olduğunda (Buton, Komut vb.)
on_guild_join(guild) Yeni sunucuya katılınca
on_guild_remove(guild) Sunucudan ayrılınca
on_member_ban(member) Üye yasaklanınca
on_member_unban(member) Yasak kaldırılınca
on_member_join(member) Üye katılınca
on_member_remove(member) Üye ayrılınca
on_invite_create(invite) Davet oluşturulunca
on_presence_update(data) Durum güncellenince


Bu kütüphane bağımsız geliştiriciler tarafından oluşturulmuştur ve Jubbio Inc. ile doğrudan bağlantısı yoktur.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jubbio_py-1.2.4.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jubbio_py-1.2.4-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

Details for the file jubbio_py-1.2.4.tar.gz.

File metadata

  • Download URL: jubbio_py-1.2.4.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for jubbio_py-1.2.4.tar.gz
Algorithm Hash digest
SHA256 b276e6ff8d5263747d5d1956f02458b33eb9f41c2a54021ce2037bab359f20cc
MD5 8242357c652296955fcb746fa1fed7ee
BLAKE2b-256 f6a83fe61dd5f0b452435c2f0ee80c7d637302ef02265a70c029cce6fe976dcc

See more details on using hashes here.

File details

Details for the file jubbio_py-1.2.4-py3-none-any.whl.

File metadata

  • Download URL: jubbio_py-1.2.4-py3-none-any.whl
  • Upload date:
  • Size: 21.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for jubbio_py-1.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4f9705037b17b9e9754ef200932ad98d3d069d42ce3ae52a08721f6c20c9a24a
MD5 a1320ac041223c70063435a5b516fd01
BLAKE2b-256 827ce596d735dcb77aa96f4f40ea46e3803533d3d53352843308f42a622da524

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page