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.1.5.tar.gz (19.7 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.1.5-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jubbio_py-1.1.5.tar.gz
  • Upload date:
  • Size: 19.7 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.1.5.tar.gz
Algorithm Hash digest
SHA256 186ad941f5f02a0b147e8552e93e9cf48c62876594da48e266696eaafbf53cae
MD5 e2f6d29e6b69162987f7f51ee4e422fc
BLAKE2b-256 eaf2f365b237ccd384b901921350c72d422c938ecc15177599565042c2ceaf9a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jubbio_py-1.1.5-py3-none-any.whl
  • Upload date:
  • Size: 19.1 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.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0b1974176d729879ff881040c3c5c24d350424a9e594b3462ce994c92cb7abc7
MD5 ce9eee9bcee2ec21153fac8d913ccac0
BLAKE2b-256 4b9f679805d2b16ba7b757379aa8d8022b69f1b6881922ca8ac2c7cf291f8f20

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