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.0.tar.gz (21.4 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.0-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jubbio_py-1.2.0.tar.gz
  • Upload date:
  • Size: 21.4 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.0.tar.gz
Algorithm Hash digest
SHA256 1de75eeb7f9b46144e7e90d4530d16683f83dca2821b179cbe826b8440972547
MD5 2e874906b0b525d7ce917274f4b3114e
BLAKE2b-256 cf881d5ca4c049687d38020d03bd7ea6837014ea37ed8c6e41870e021496e3a1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jubbio_py-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 21.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67074949a832c4cf432529b9f55c9e75ac9d5bc4b6f6f186e8570f7cfa10cd8f
MD5 136ac80f2b12fb4f26d39cd9fc995d0b
BLAKE2b-256 3d3b20c684dcdef20cdcd981885b41b12127254c21bfabf8e01fd54f1c2614bf

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