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, guild_id='SUNUCU_ID')

@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.0.8.tar.gz (19.5 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.0.8-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jubbio_py-1.0.8.tar.gz
  • Upload date:
  • Size: 19.5 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.0.8.tar.gz
Algorithm Hash digest
SHA256 39416f8d5b1e4a2e5f1679da0fc771c4a6275d00f6a944f744a47f2ebbaff2c4
MD5 07e500587411623100f1acccdf940850
BLAKE2b-256 502e883b9a9b900c931ae333105b27c2444df40686a69ea3ba5cfdf58b215b7c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jubbio_py-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 18.9 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.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 592248bfde2ff269fde2e0ae820d51a41f148b07a0a80b6c76e30086c3140a04
MD5 f08ebd7bd6575a9d6dae11c72416415b
BLAKE2b-256 840ca76e520524ef0c69004c17abce03659afa1730de26fdcf49c96e41ac2a7a

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