Пример #1
0
def gbanstat(update: Update, context: CallbackContext):
    args = context.args
    if len(args) > 0:
        if args[0].lower() in ["on", "yes"]:
            sql.enable_gbans(update.effective_chat.id)
            update.effective_message.reply_text("Antispam aktivdir ✅")
        elif args[0].lower() in ["off", "no"]:
            sql.disable_gbans(update.effective_chat.id)
            update.effective_message.reply_text("Antispam deaktivdir ❌")
    else:
        update.effective_message.reply_text(
            "Mənə bir arqument verməlisən! on/off, yes/no!\n\n"
            "Hazırki ayar: {}\n"
            "Aktiv olduqda gban bu bu qrupa təsir edəcək. Əks halda yox.".
            format(sql.does_chat_gban(update.effective_chat.id)))
Пример #2
0
def gbanstat(update: Update, context:CallbackContext):
    bot, args = context.bot, context.args
    if len(args) > 0:
        if args[0].lower() in ["on", "yes"]:
            sql.enable_gbans(update.effective_chat.id)
            update.effective_message.reply_text("I've enabled gbans in this group. This will help protect you "
                                                "from spammers, unsavoury characters, and the biggest trolls.")
        elif args[0].lower() in ["off", "no"]:
            sql.disable_gbans(update.effective_chat.id)
            update.effective_message.reply_text("I've disabled gbans in this group. GBans wont affect your users "
                                                "anymore. You'll be less protected from any trolls and spammers "
                                                "though!")
    else:
        update.effective_message.reply_text("Give me some arguments to choose a setting! on/off, yes/no!\n\n"
                                            "Your current setting is: {}\n"
                                            "When True, any gbans that happen will also happen in your group. "
                                            "When False, they won't, leaving you at the possible mercy of "
                                            "spammers.".format(sql.does_chat_gban(update.effective_chat.id)))
def gbanstat(update: Update, context: CallbackContext):
    args = context.args
    if len(args) > 0:
        if args[0].lower() in ["on", "yes"]:
            sql.enable_gbans(update.effective_chat.id)
            update.effective_message.reply_text(
                "Antispam is now enabled ✅ "
                "I am now protecting your group from potential remote threats!")
        elif args[0].lower() in ["off", "no"]:
            sql.disable_gbans(update.effective_chat.id)
            update.effective_message.reply_text("Antispan is now disabled ❌ "
                                                "Spamwatch is now disabled ❌")
    else:
        update.effective_message.reply_text(
            "Give me some arguments to choose a setting! on/off, yes/no!\n\n"
            "Your current setting is: {}\n"
            "When True, any gbans that happen will also happen in your group. "
            "When False, they won't, leaving you at the possible mercy of "
            "spammers.".format(sql.does_chat_gban(update.effective_chat.id)))
Пример #4
0
def gbanstat(bot: Bot, update: Update, args: List[str]):
    if len(args) > 0:
        if args[0].lower() in ["on", "yes"]:
            sql.enable_gbans(update.effective_chat.id)
            update.effective_message.reply_text(
                "Bu grupta gbans'ı etkinleştirdim. Bu sizi korumaya yardımcı olacaktır "
                "spam gönderenler, hoş olmayan karakterler ve en büyük trollerden."
            )
        elif args[0].lower() in ["off", "no"]:
            sql.disable_gbans(update.effective_chat.id)
            update.effective_message.reply_text(
                "Bu gruptaki gbansları devre dışı bıraktım. GBans kullanıcılarınızı etkilemez "
                "Artık. Herhangi bir trol ve spam göndericisinden daha az korunacaksınız "
                "rağmen!")
    else:
        update.effective_message.reply_text(
            "Bir ayar seçmem için bana bazı argümanlar verin! on/off, yes/no!\n\n"
            "Geçerli ayarınız: {}\n"
            "True olduğunda, grubunuzda gerçekleşen herhangi bir gbans da gerçekleşir. "
            "Yanlış olduğunda, sizi olası merhametine bırakmazlar. "
            "spammers.".format(sql.does_chat_gban(update.effective_chat.id)))