Giter VIP home page Giter VIP logo

broadcast-1's Introduction


🧩 Özellikleri


• Gruplar ve üyelere yayın yapabilir,

• Toplam grup ve üye sayılarını görebilir,

• Kullanıcıları veya grupları botunuzun kullanımından yasaklayabilirsiniz.



➕ Ek özellikler


• İsteğe bağlı gruplarda değiştirilebilir komut silme özelliği,

• Yasaklılar listesini görme özelliği,

• Yapılacak yayının iletimi yoksa kopyası olarak mı göndereliceğinin seçilebilir olması.


Broadcast'i kullanmak için bazı gereksinimler vardır.

📍 Gereksinimler


DATABASE_URL

Veritabanı olarak MongoDB kullanıldığı için MongoDB url almanız gerekmektedir. Nasıl alınacağını bilmiyorsanız, burayı kontrol edebilir ya da destek grubuna gelerek yardım alabilirsiniz.



🌀 BOT_USERNAME

@BotFather'dan oluşturduğunuz botun kullanıcı adı.



📋 LOG_CHANNEL


Botun eylemleri kaydedeceği grub'un kimliği. Kimliği elde etmek için, bir grup oluşturun ve @MissRose_bot'u gruba ekleyin ve /id yazın.



🔹 GROUP_SUPPORT


Kullanıcıların itiraz edebilmesi için bir grup kimliği yazın. Eğer ayarlanmazsa, bot sahibine yönlendirir.



OWNER_ID


Botun sahibinin id'si



😃 LANGUAGE


İki dil mevcuttur, Türkçe ve Azerbaycanca. Eğer ayarlanmazsa Türkçe olur.



♻️ GONDERME_TURU


Gönderilen mesajın ne şekilde gönderileceğini ayarlamak içindir. False olarak ayarlarsanız iletir, True olarak ayarlarsanız kopyasını gönderir.




🧮 Kullanım


Botunuz, çok modüllü ise dosyaları arasına alıp gerekli değişkenleri yerel ya da sunucunun olarak ekledikten sonra requirements.txt dosyasına gerekli kütüphaneleri ekleyin.

Ama eğer tek dosya üzerinden çalışıyorsanız Client'i kendi botunuzun Client'ine göre değiştirmeniz gerekmektedir.


📚 Gerekli kütüphaneler
pymongo[srv]
aiofiles
psutil

💻 Ek olarak

Mesaj silme özelliği kodları:

Komut mesajlarını silme özelliğini açmak isteyenler için kod:
@Client.on_message(~filters.private)
async def delcmd(_, message: Message):
    if await delcmd_is_on(message.chat.id) and message.text.startwith("/") or message.text.startwith("!"):
        await message.delete()
    await message.continue_propagation()
Mesaj silme özelliğinin farklı gruplarda kapatılıp açılmasını sağlayan kod:
@Client.on_message(filters.command("delcmd") & ~filters.private)
async def delcmdc(bot: Client, message: Message):
    if len(message.command) != 2:
        return await message.reply_text("Bu komutu kullanmak için komutunuzun yanına 'off' ya da 'on' yazınız.")
    durum = message.text.split(None, 1)[1].strip()
    durum = durum.lower()
    chat_id = message.chat.id

    if durum == "on":
        if await delcmd_is_on(message.chat.id):
            return await message.reply_text("Komut Silme Zaten Açık.")
        else:
            await delcmd_on(chat_id)
            await message.reply_text("Bu sohbet için Komut Silme özelliği başarıyla etkinleştirildi.")

    elif durum == "off":
        await delcmd_off(chat_id)
        await message.reply_text("Bu Sohbet için Komut Silme özelliği başarıyla devre dışı bırakıldı.")
    else:
        await message.reply_text("Bu komutu kullanmak için komutunuzun yanına 'off' ya da 'on' yazınız.")

broadcast-1's People

Contributors

y4kupkaya avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.