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.1.tar.gz (21.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.2.1-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jubbio_py-1.2.1.tar.gz
  • Upload date:
  • Size: 21.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.2.1.tar.gz
Algorithm Hash digest
SHA256 655eb4f5976f606c34e86e4cefbc026d955624b8e30c195741f5567691480a73
MD5 f4c295d9f120893d284fb0376594171a
BLAKE2b-256 6c1abc2c0064ff1e69f4e13f3a5eab72ed43c43671899d7150b4eb2831021978

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jubbio_py-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 21.5 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 558b0c283218a4b67d56403ce894f023f168ea6c79b6fca1836b474d540253c6
MD5 46e60fb0266064db404102b8d847f3ee
BLAKE2b-256 c5d7500e8ff30bcc5209b1e3b9a083ec7336bfadc71c1a57893369669aab72d9

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